aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
diff options
context:
space:
mode:
authorMinghao Chi <chi.minghao@zte.com.cn>2022-06-02 07:18:09 +0000
committerMark Brown <broonie@kernel.org>2022-06-06 12:38:51 +0100
commit12ba5ceb4a08d5ea776d3eaf83c0cee63fafe952 (patch)
treed2a4983c221c7394a003da3358b462c330ebfc20 /sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
parentASoC: codecs: da7210: add check for i2c_add_driver (diff)
downloadlinux-dev-12ba5ceb4a08d5ea776d3eaf83c0cee63fafe952.tar.xz
linux-dev-12ba5ceb4a08d5ea776d3eaf83c0cee63fafe952.zip
ASoC: mediatek: remove unnecessary check of clk_disable_unprepare
Because clk_disable_unprepare already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Link: https://lore.kernel.org/r/20220602071809.278134-1-chi.minghao@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/mediatek/mt8173/mt8173-afe-pcm.c')
-rw-r--r--sound/soc/mediatek/mt8173/mt8173-afe-pcm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
index 31494930433f..dcaeeeb8aac7 100644
--- a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
+++ b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
@@ -286,10 +286,8 @@ static int mt8173_afe_dais_set_clks(struct mtk_base_afe *afe,
static void mt8173_afe_dais_disable_clks(struct mtk_base_afe *afe,
struct clk *m_ck, struct clk *b_ck)
{
- if (m_ck)
- clk_disable_unprepare(m_ck);
- if (b_ck)
- clk_disable_unprepare(b_ck);
+ clk_disable_unprepare(m_ck);
+ clk_disable_unprepare(b_ck);
}
static int mt8173_afe_i2s_startup(struct snd_pcm_substream *substream,