Skip to content

Commit f37ab21

Browse files
Chen Nibroonie
authored andcommitted
ASoC: mt8365: remove unnecessary NULL check before clk_disable_unprepare()
clk_disable_unprepare() already checks NULL by using IS_ERR_OR_NULL. Remove unneeded NULL check for clk here. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://patch.msgid.link/20250312032600.1235158-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 1458fae commit f37ab21

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sound/soc/mediatek/mt8365/mt8365-afe-clk.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ int mt8365_afe_init_audio_clk(struct mtk_base_afe *afe)
4949

5050
void mt8365_afe_disable_clk(struct mtk_base_afe *afe, struct clk *clk)
5151
{
52-
if (clk)
53-
clk_disable_unprepare(clk);
52+
clk_disable_unprepare(clk);
5453
}
5554

5655
int mt8365_afe_set_clk_rate(struct mtk_base_afe *afe, struct clk *clk,

0 commit comments

Comments
 (0)