From: Takashi Iwai Subject: Re: [PATCH v3] ALSA: sonicvibes: add error handling for snd_ctl_add Date: Thu, 14 Jun 2018 18:00:41 +0200 Message-ID: References: <1528704521-34060-1-git-send-email-jiazhouyang09@gmail.com> <1528976499-52071-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 Return-path: In-Reply-To: <1528976499-52071-1-git-send-email-jiazhouyang09@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: Zhouyang Jia Cc: alsa-devel@alsa-project.org, Bhumika Goyal , Jaroslav Kysela , linux-kernel@vger.kernel.org List-Id: alsa-devel@alsa-project.org On Thu, 14 Jun 2018 13:41:37 +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 > --- > v1->v2: > - Check the return value of snd_sonicvibes_create_gameport. > v2->v3: > - Fix the code style. Applied, thanks. Takashi