[PATCH 06/13] ASoC: mediatek: mt8189: Use dev_err_probe() for clock errors
phucduc.bui at gmail.com
phucduc.bui at gmail.com
Thu Sep 10 05:57:35 PDT 2026
From: bui duc phuc <phucduc.bui at gmail.com>
Use dev_err_probe() when obtaining clocks to avoid redundant error
messages, particularly for probe deferral.
Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
---
sound/soc/mediatek/mt8189/mt8189-afe-clk.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/soc/mediatek/mt8189/mt8189-afe-clk.c b/sound/soc/mediatek/mt8189/mt8189-afe-clk.c
index 435914aafb44..4997031cbcab 100644
--- a/sound/soc/mediatek/mt8189/mt8189-afe-clk.c
+++ b/sound/soc/mediatek/mt8189/mt8189-afe-clk.c
@@ -793,10 +793,9 @@ int mt8189_init_clock(struct mtk_base_afe *afe)
for (i = 0; i < MT8189_CLK_NUM; i++) {
afe_priv->clk[i] = devm_clk_get(afe->dev, aud_clks[i]);
- if (IS_ERR(afe_priv->clk[i])) {
- dev_err(afe->dev, "devm_clk_get %s fail\n", aud_clks[i]);
- return PTR_ERR(afe_priv->clk[i]);
- }
+ if (IS_ERR(afe_priv->clk[i]))
+ return dev_err_probe(afe->dev, PTR_ERR(afe_priv->clk[i]),
+ "failed to get clock %s\n", aud_clks[i]);
}
ret = mt8189_afe_disable_apll(afe);
--
2.43.0
More information about the Linux-mediatek
mailing list