Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752551AbZFVF4m (ORCPT ); Mon, 22 Jun 2009 01:56:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751347AbZFVF4d (ORCPT ); Mon, 22 Jun 2009 01:56:33 -0400 Received: from cantor.suse.de ([195.135.220.2]:51791 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750992AbZFVF4d (ORCPT ); Mon, 22 Jun 2009 01:56:33 -0400 Date: Mon, 22 Jun 2009 07:56:35 +0200 Message-ID: From: Takashi Iwai To: Mariusz Kozlowski Cc: Jaroslav Kysela , linux-kernel@vger.kernel.org Subject: Re: [PATCH] sound: fix check for return value in snd_pcm_hw_refine In-Reply-To: <20090621202659.76ae16e8@mako-desktop> References: <20090621202659.76ae16e8@mako-desktop> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/22.3 (x86_64-suse-linux-gnu) MULE/5.0 (SAKAKI) 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: 1048 Lines: 38 At Sun, 21 Jun 2009 20:26:59 +0200, Mariusz Kozlowski wrote: > > Hello, > > 'params' is a pointer and looking at the code this probably should be a check > for ioctl return value. > > Mariusz > > > Signed-off-by: Mariusz Kozlowski Applied now. Thanks! Takashi > > diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c > index 84da3ba..ac2150e 100644 > --- a/sound/core/pcm_native.c > +++ b/sound/core/pcm_native.c > @@ -320,7 +320,7 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream, > snd_mask_max(¶ms->masks[SNDRV_PCM_HW_PARAM_CHANNELS])) { > changed = substream->ops->ioctl(substream, > SNDRV_PCM_IOCTL1_FIFO_SIZE, params); > - if (params < 0) > + if (changed < 0) > return changed; > } > } > -- 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/