Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4061132imm; Mon, 11 Jun 2018 06:26:44 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKoe87ooArH/JO38abNZYkuhbSZlUgwfO8NAYVpQGMJZzf9INF6U2nykC+JcXGQDETB+EfQ X-Received: by 2002:aa7:8051:: with SMTP id y17-v6mr17593896pfm.148.1528723604783; Mon, 11 Jun 2018 06:26:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528723604; cv=none; d=google.com; s=arc-20160816; b=D5iBSggtgU5P7iTUs5RC13/IsecIhFlE9ej/6zBRoVh4yQBiSEQwqpLdxEP04t5wCW q3bvD0pD72SWXTiC35mB3ez9cSbJZZ9ThzoTR36W07hZONh/EZ8tID0zkqDVM0b99761 kRwZwpSf4mQ5TJfEn2vj5ojCOiiV53DVng7gkRUzUTZ2YKwpwPAHNUsoO9JtMpp/Evtc RXB2csEmsGTS0ORiMXDqifWRR9MthEdrP56kosi2cptFga+J4T1GORFLaQn1jCKB4ayh F5euja7jRXxgjoptpC8sjZzw8aLaZIhkqgIJzIYq060R7feuWJxXK6K+e/HE5TK90FKo UQPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date :arc-authentication-results; bh=5RtTNZVzRwIcGry9XpUlwUKFkR7b5uz97rD/CHfy3vY=; b=IMHkJPDTqvGrM+Ymjn5RRDH44CTwLf8zanFFH6e/ral9zGtjvAcBk060aadjURGWv1 VMDVfs+61ZwiGhCvcm/OyKHWOdPg+IhPFnuC6mFxWW0gqmxQU6lvZk0GyaQSkAxtG/Ss Pi06NtQFR0B42xGb+LQKQopCJukfKEVEDjSW0yfX3rW0KHubRcZiFKyuwTlPfX5wGvhM yclDKDzqeeAbHVstM6ehaMole6m833dx0lFhmoGO7CX+PHF3SJt9J13tOAKmMHierji8 WlWjV9S4Z5dDZEGnAd5w94IT1tRdA6/r0t46RhFOhxh9kKWJVPhR+URBZixF6aPJd5B/ 171Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h192-v6si35125491pgc.540.2018.06.11.06.26.30; Mon, 11 Jun 2018 06:26:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933244AbeFKN0F (ORCPT + 99 others); Mon, 11 Jun 2018 09:26:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:53330 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932607AbeFKN0E (ORCPT ); Mon, 11 Jun 2018 09:26:04 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E5A28AC44; Mon, 11 Jun 2018 13:26:02 +0000 (UTC) Date: Mon, 11 Jun 2018 15:26:02 +0200 Message-ID: From: Takashi Iwai To: "Zhouyang Jia" Cc: , "Bhumika Goyal" , "Jaroslav Kysela" , Subject: Re: [PATCH] ALSA: sonicvibes: add error handling for snd_ctl_add In-Reply-To: <1528704521-34060-1-git-send-email-jiazhouyang09@gmail.com> References: <1528704521-34060-1-git-send-email-jiazhouyang09@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 11 Jun 2018 10:08:40 +0200, Zhouyang Jia wrote: > > When snd_ctl_add fails, the lack of error-handling code may > cause unexpected results. > > This patch adds error-handling code after calling snd_ctl_add. > > Signed-off-by: Zhouyang Jia I postpone this one because the change won't give anything as is although this change itself is correct. If you look at the code closely, the caller of snd_sonicvibes_create_gameport() ignores the return value. So we need to fix two places. thanks, Takashi