]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: davinci-mcasp: Return value handling cleanup for mcasp_common_hw_param()
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 30 Jan 2014 13:15:24 +0000 (15:15 +0200)
committerMark Brown <broonie@linaro.org>
Fri, 31 Jan 2014 16:38:24 +0000 (16:38 +0000)
Take the return value from mcasp_common_hw_param() and use that in case of
error.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/davinci/davinci-mcasp.c

index f662ef22b8aefa4c3f877b2d7af8109870219df1..f837b0a4f6f49b83d7acf6446b1c42fb5f13979a 100644 (file)
@@ -631,8 +631,10 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream,
 
        active_serializers = (channels + slots - 1) / slots;
 
-       if (mcasp_common_hw_param(mcasp, substream->stream, channels) == -EINVAL)
-               return -EINVAL;
+       ret = mcasp_common_hw_param(mcasp, substream->stream, channels);
+       if (ret)
+               return ret;
+
        if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
                fifo_level = mcasp->txnumevt * active_serializers;
        else