Commit 74eaa812 authored by Minghao Chi's avatar Minghao Chi Committed by Mark Brown

ASoC: mediatek: simplify the return expression of mtk_dai_pcm_prepare()

Simplify the return expression.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220505021808.54337-1-chi.minghao@zte.com.cnSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ef1258a7
......@@ -213,8 +213,6 @@ static int mtk_dai_pcm_configure(struct snd_pcm_substream *substream,
static int mtk_dai_pcm_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
int ret;
dev_dbg(dai->dev, "%s(), id %d, stream %d, widget active p %d, c %d\n",
__func__, dai->id, substream->stream,
dai->playback_widget->active, dai->capture_widget->active);
......@@ -222,11 +220,7 @@ static int mtk_dai_pcm_prepare(struct snd_pcm_substream *substream,
if (dai->playback_widget->active || dai->capture_widget->active)
return 0;
ret = mtk_dai_pcm_configure(substream, dai);
if (ret)
return ret;
return 0;
return mtk_dai_pcm_configure(substream, dai);
}
static int mtk_dai_pcm_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment