summaryrefslogtreecommitdiff
path: root/sound/soc/mediatek
diff options
context:
space:
mode:
authorMinghao Chi <chi.minghao@zte.com.cn>2022-05-05 02:18:08 +0000
committerMark Brown <broonie@kernel.org>2022-05-09 12:48:42 +0100
commit74eaa8126f50e52a19f055eed002cc76cf3122dc (patch)
tree7a39de0c177a1d62c20591b2e3c6647cd7e54a11 /sound/soc/mediatek
parentef1258a7820d99cc7999cafbd8ea78a24559ff12 (diff)
ASoC: mediatek: simplify the return expression of mtk_dai_pcm_prepare()
Simplify the return expression. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Link: https://lore.kernel.org/r/20220505021808.54337-1-chi.minghao@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/mediatek')
-rw-r--r--sound/soc/mediatek/mt8195/mt8195-dai-pcm.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sound/soc/mediatek/mt8195/mt8195-dai-pcm.c b/sound/soc/mediatek/mt8195/mt8195-dai-pcm.c
index 151914c873ac..12644ded83d5 100644
--- a/sound/soc/mediatek/mt8195/mt8195-dai-pcm.c
+++ b/sound/soc/mediatek/mt8195/mt8195-dai-pcm.c
@@ -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)