[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250312032600.1235158-1-nichen@iscas.ac.cn>
Date: Wed, 12 Mar 2025 11:26:00 +0800
From: Chen Ni <nichen@...as.ac.cn>
To: lgirdwood@...il.com,
broonie@...nel.org,
perex@...ex.cz,
tiwai@...e.com,
matthias.bgg@...il.com,
angelogioacchino.delregno@...labora.com,
amergnat@...libre.com,
linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Cc: Chen Ni <nichen@...as.ac.cn>
Subject: [PATCH] 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@...as.ac.cn>
---
sound/soc/mediatek/mt8365/mt8365-afe-clk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/mediatek/mt8365/mt8365-afe-clk.c b/sound/soc/mediatek/mt8365/mt8365-afe-clk.c
index 8a0af2ea8546..7078c01ba19b 100644
--- a/sound/soc/mediatek/mt8365/mt8365-afe-clk.c
+++ b/sound/soc/mediatek/mt8365/mt8365-afe-clk.c
@@ -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,
--
2.25.1
Powered by blists - more mailing lists