Skip to content

Commit

Permalink
ASoC: davinci-mcasp: Return value handling cleanup for mcasp_common_h…
Browse files Browse the repository at this point in the history
…w_param()

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>
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Jan 31, 2014
1 parent 61d384a commit 0f7d9a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sound/soc/davinci/davinci-mcasp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0f7d9a6

Please sign in to comment.