mirror of
https://github.com/torvalds/linux.git
synced 2024-12-21 18:42:44 +00:00
ASoC: davinci-mcasp: Return value handling cleanup for mcasp_common_hw_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>
This commit is contained in:
parent
61d384aed4
commit
0f7d9a635b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user