Skip to content

Commit

Permalink
ASoC: mt8365: remove unnecessary NULL check before clk_disable_unprep…
Browse files Browse the repository at this point in the history
…are()

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>
  • Loading branch information
Chen Ni authored and Mark Brown committed Mar 16, 2025
1 parent 1458fae commit f37ab21
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/soc/mediatek/mt8365/mt8365-afe-clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ int mt8365_afe_init_audio_clk(struct mtk_base_afe *afe)

void mt8365_afe_disable_clk(struct mtk_base_afe *afe, struct clk *clk)
{
if (clk)
clk_disable_unprepare(clk);
clk_disable_unprepare(clk);
}

int mt8365_afe_set_clk_rate(struct mtk_base_afe *afe, struct clk *clk,
Expand Down

0 comments on commit f37ab21

Please sign in to comment.