[PATCH v3 07/12] ASoC: mediatek: mt8189: Remove redundant error message
From: phucduc . bui
Date: Wed Sep 16 2026 - 01:02:53 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.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
Changes in v3:
- Add Angelo's Reviewed-by tag.
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 39cc2804ad4c..11dba86c3e81 100644
--- a/sound/soc/mediatek/mt8189/mt8189-afe-pcm.c
+++ b/sound/soc/mediatek/mt8189/mt8189-afe-pcm.c
@@ -2486,13 +2486,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 */
@@ -2526,13 +2525,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);
@@ -2601,10 +2600,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