提交 0f7d9a63 编写于 作者: P Peter Ujfalusi 提交者: Mark Brown

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: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 61d384ae
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册