From: Mariusz Kozlowski Date: Sun, 21 Jun 2009 18:26:59 +0000 (+0200) Subject: sound: fix check for return value in snd_pcm_hw_refine X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8bd9bca3c1a214350e2f2f1e2fd493ed24c06f7e;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git sound: fix check for return value in snd_pcm_hw_refine 'params' is a pointer and looking at the code this probably should be a check for ioctl return value. Signed-off-by: Mariusz Kozlowski Signed-off-by: Takashi Iwai --- diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 84da3ba17c86..ac2150e0670d 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; } }