From: Takashi Iwai Subject: Re: [PATCH] ALSA: sonicvibes: add error handling for snd_ctl_add Date: Mon, 11 Jun 2018 15:26:02 +0200 Message-ID: References: <1528704521-34060-1-git-send-email-jiazhouyang09@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 6B06C26720C for ; Mon, 11 Jun 2018 15:26:03 +0200 (CEST) In-Reply-To: <1528704521-34060-1-git-send-email-jiazhouyang09@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Zhouyang Jia Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Bhumika Goyal List-Id: alsa-devel@alsa-project.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