Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932926Ab3FRORG (ORCPT ); Tue, 18 Jun 2013 10:17:06 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44744 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932868Ab3FRORE (ORCPT ); Tue, 18 Jun 2013 10:17:04 -0400 Date: Tue, 18 Jun 2013 16:17:21 +0200 Message-ID: From: Takashi Iwai To: Wei Yongjun Cc: clemens@ladisch.de, perex@perex.cz, yongjun_wei@trendmicro.com.cn, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: firewire: fix error return code in scs_probe() In-Reply-To: References: 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/24.2 (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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1207 Lines: 41 At Tue, 18 Jun 2013 21:09:42 +0800, Wei Yongjun wrote: > > From: Wei Yongjun > > Fix to return -ENOMEM in the kmalloc() error handling > case instead of 0, as done elsewhere in this function. > > Signed-off-by: Wei Yongjun Thanks, applied with ack by Clemens. Takashi > --- > sound/firewire/scs1x.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/sound/firewire/scs1x.c b/sound/firewire/scs1x.c > index 844a555..b252c21 100644 > --- a/sound/firewire/scs1x.c > +++ b/sound/firewire/scs1x.c > @@ -405,8 +405,10 @@ static int scs_probe(struct device *unit_dev) > scs->output_idle = true; > > scs->buffer = kmalloc(HSS1394_MAX_PACKET_SIZE, GFP_KERNEL); > - if (!scs->buffer) > + if (!scs->buffer) { > + err = -ENOMEM; > goto err_card; > + } > > scs->hss_handler.length = HSS1394_MAX_PACKET_SIZE; > scs->hss_handler.address_callback = handle_hss; > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/