[PATCH 08/13] ASoC: mediatek: mt8189: Remove redundant error message
From: phucduc . bui
Date: Thu Sep 10 2026 - 09:14:11 EST
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
The errors handled here are already reported by the called functions,
either directly or deeper in the call chain. Therefore, the additional
dev_err() and dev_err_probe() call is redundant and can be removed.
Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/mediatek/mt8189/mt8189-afe-pcm.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/sound/soc/mediatek/mt8189/mt8189-afe-pcm.c b/sound/soc/mediatek/mt8189/mt8189-afe-pcm.c
index 431320719b63..9335a9e44665 100644
--- a/sound/soc/mediatek/mt8189/mt8189-afe-pcm.c
+++ b/sound/soc/mediatek/mt8189/mt8189-afe-pcm.c
@@ -2488,13 +2488,12 @@ static int mt8189_afe_pcm_dev_probe(struct platform_device *pdev)
afe->base_addr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(afe->base_addr))
- return dev_err_probe(dev, PTR_ERR(afe->base_addr),
- "AFE base_addr not found\n");
+ return PTR_ERR(afe->base_addr);
/* init audio related clock */
ret = mt8189_init_clock(afe);
if (ret)
- return dev_err_probe(dev, ret, "init clock error.\n");
+ return ret;
/* init memif */
/* IPM2.0 no need banding */
@@ -2528,13 +2527,13 @@ static int mt8189_afe_pcm_dev_probe(struct platform_device *pdev)
/* request irq */
irq_id = platform_get_irq(pdev, 0);
if (irq_id < 0)
- return dev_err_probe(dev, irq_id, "no irq found");
+ return irq_id;
ret = devm_request_irq(dev, irq_id, mt8189_afe_irq_handler,
IRQF_TRIGGER_NONE,
"Afe_ISR_Handle", afe);
if (ret)
- return dev_err_probe(dev, ret, "could not request_irq for Afe_ISR_Handle\n");
+ return ret;
/* init sub_dais */
INIT_LIST_HEAD(&afe->sub_dais);
@@ -2603,10 +2602,8 @@ static int mt8189_afe_pcm_dev_probe(struct platform_device *pdev)
&mt8189_afe_component,
afe->dai_drivers,
afe->num_dai_drivers);
- if (ret) {
- dev_err(dev, "afe component err: %d\n", ret);
+ if (ret)
return ret;
- }
return 0;
--
2.43.0