[PATCH v2] staging: most: dim2: remove redundant dev_err() calls

From: Melih Emik

Date: Sun Oct 18 2026 - 07:01:10 EST


Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_threaded_irq() and
devm_request_irq() automatically log detailed failure diagnostics
including device name, IRQ number, handlers, and the error code via
dev_err_probe().

Consequently, driver-specific dev_err() calls immediately following
these requests produce duplicate error messages on failure and are
redundant. Remove the redundant dev_err() calls in dim2_probe().

Signed-off-by: Melih Emik <melihemik@xxxxxxxxxxx>
---
v2:
- Drop "Tested:" meta commentary from the commit message as suggested
by Dan Carpenter.

Test notes:
- Compiled with W=1 on x86_64 with zero warnings.
- Verified with lockdep and debug mutexes enabled
(CONFIG_PROVE_LOCKING=y, CONFIG_DEBUG_MUTEXES=y).
- Boot-tested full bzImage in QEMU with initcall_debug, confirming
successful driver registration (dim2_driver_init returned 0) and
zero lockdep/kernel warnings.
- Verified with scripts/checkpatch.pl (0 errors, 0 warnings).

drivers/staging/most/dim2/dim2.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
index 0e2512d16632..d57e20d399c7 100644
--- a/drivers/staging/most/dim2/dim2.c
+++ b/drivers/staging/most/dim2/dim2.c
@@ -818,10 +818,8 @@ static int dim2_probe(struct platform_device *pdev)

ret = devm_request_threaded_irq(&pdev->dev, irq, dim2_ahb_isr,
dim2_task_irq, 0, "dim2_ahb0_int", dev);
- if (ret) {
- dev_err(&pdev->dev, "failed to request ahb0_int irq %d\n", irq);
+ if (ret)
goto err_shutdown_dim;
- }

irq = platform_get_irq(pdev, MLB_INT_IDX);
if (irq < 0) {
@@ -831,10 +829,8 @@ static int dim2_probe(struct platform_device *pdev)

ret = devm_request_irq(&pdev->dev, irq, dim2_mlb_isr, 0,
"dim2_mlb_int", dev);
- if (ret) {
- dev_err(&pdev->dev, "failed to request mlb_int irq %d\n", irq);
+ if (ret)
goto err_shutdown_dim;
- }

init_waitqueue_head(&dev->netinfo_waitq);
dev->deliver_netinfo = 0;
--
2.56.0