Message ID | 1353488819-13902-2-git-send-email-sachin.kamat@linaro.org |
---|---|
State | Accepted |
Headers | show |
At Wed, 21 Nov 2012 14:36:55 +0530, Sachin Kamat wrote: > > Return the value obtained from snd_pcm_hw_constraint_minmax() instead > of -EINVAL. Silences the following smatch warning: > sound/core/pcm_native.c:2003 snd_pcm_hw_constraints_complete() info: > why not propagate 'err' from snd_pcm_hw_constraint_minmax() instead of -22? > > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Thanks, applied. Takashi > --- > Build tested and based on linux-next 20121115. > --- > sound/core/pcm_native.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c > index c76f6375..09b4286 100644 > --- a/sound/core/pcm_native.c > +++ b/sound/core/pcm_native.c > @@ -2000,7 +2000,7 @@ int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream) > if (runtime->dma_bytes) { > err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 0, runtime->dma_bytes); > if (err < 0) > - return -EINVAL; > + return err; > } > > if (!(hw->rates & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS))) { > -- > 1.7.4.1 >
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index c76f6375..09b4286 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -2000,7 +2000,7 @@ int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream) if (runtime->dma_bytes) { err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 0, runtime->dma_bytes); if (err < 0) - return -EINVAL; + return err; } if (!(hw->rates & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS))) {
Return the value obtained from snd_pcm_hw_constraint_minmax() instead of -EINVAL. Silences the following smatch warning: sound/core/pcm_native.c:2003 snd_pcm_hw_constraints_complete() info: why not propagate 'err' from snd_pcm_hw_constraint_minmax() instead of -22? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- Build tested and based on linux-next 20121115. --- sound/core/pcm_native.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)