From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755045Ab2JVOdL (ORCPT ); Mon, 22 Oct 2012 10:33:11 -0400 Received: from cantor2.suse.de ([195.135.220.15]:43241 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754721Ab2JVOdK (ORCPT ); Mon, 22 Oct 2012 10:33:10 -0400 Date: Mon, 22 Oct 2012 16:33:08 +0200 Message-ID: From: Takashi Iwai To: Denis Kirjanov Cc: perex@perex.cz, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] check for the kzalloc return value In-Reply-To: <1350911153-23647-1-git-send-email-kirjanov@gmail.com> References: <1350911153-23647-1-git-send-email-kirjanov@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/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 At Mon, 22 Oct 2012 17:05:53 +0400, Denis Kirjanov wrote: > > > Signed-off-by: Denis Kirjanov Thanks, applied. Takashi > --- > sound/pci/als300.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/sound/pci/als300.c b/sound/pci/als300.c > index 68c4469..e1f74d4 100644 > --- a/sound/pci/als300.c > +++ b/sound/pci/als300.c > @@ -394,6 +394,8 @@ static int snd_als300_playback_open(struct snd_pcm_substream *substream) > struct snd_als300_substream_data *data = kzalloc(sizeof(*data), > GFP_KERNEL); > > + if (!data) > + return -ENOMEM; > snd_als300_dbgcallenter(); > chip->playback_substream = substream; > runtime->hw = snd_als300_playback_hw; > @@ -425,6 +427,8 @@ static int snd_als300_capture_open(struct snd_pcm_substream *substream) > struct snd_als300_substream_data *data = kzalloc(sizeof(*data), > GFP_KERNEL); > > + if (!data) > + return -ENOMEM; > snd_als300_dbgcallenter(); > chip->capture_substream = substream; > runtime->hw = snd_als300_capture_hw; > -- > 1.7.9.5 >