[PATCH 1/3] counter: stm32-timer-cnt: Remove redundant dev_err()

From: Pan Chuang

Date: Wed Jul 15 2026 - 09:57:23 EST


devm_request_irq() automatically logs detailed error messages on
failure. Remove the now-redundant driver-specific dev_err() calls.

Signed-off-by: Pan Chuang <panchuang@xxxxxxxx>
Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
---
drivers/counter/stm32-timer-cnt.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-cnt.c
index a3d8f7a5874e..9eee281350d0 100644
--- a/drivers/counter/stm32-timer-cnt.c
+++ b/drivers/counter/stm32-timer-cnt.c
@@ -759,11 +759,8 @@ static int stm32_timer_cnt_probe(struct platform_device *pdev)
/* All events reported through the global interrupt */
ret = devm_request_irq(&pdev->dev, ddata->irq[0], stm32_timer_cnt_isr,
0, dev_name(dev), counter);
- if (ret) {
- dev_err(dev, "Failed to request irq %d (err %d)\n",
- ddata->irq[0], ret);
+ if (ret)
return ret;
- }
} else {
for (i = 0; i < priv->nr_irqs; i++) {
/*
@@ -775,11 +772,8 @@ static int stm32_timer_cnt_probe(struct platform_device *pdev)

ret = devm_request_irq(&pdev->dev, ddata->irq[i], stm32_timer_cnt_isr,
0, dev_name(dev), counter);
- if (ret) {
- dev_err(dev, "Failed to request irq %d (err %d)\n",
- ddata->irq[i], ret);
+ if (ret)
return ret;
- }
}
}

--
2.34.1