]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: adc: ade9000: use dev_err_probe() in probe path
authorAntoniu Miclaus <antoniu.miclaus@analog.com>
Fri, 20 Feb 2026 13:11:43 +0000 (15:11 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 23 Feb 2026 21:00:57 +0000 (21:00 +0000)
Replace dev_err() + return with dev_err_probe() in ade9000_reset(),
which is called during probe. This simplifies error handling.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ade9000.c

index db085dc5e526618ebe2c70797225f33295f0695b..5dcc26a08970390f6dd64493724d7f6533906fd9 100644 (file)
@@ -1589,10 +1589,9 @@ static int ade9000_reset(struct ade9000_state *st)
        /* Only wait for completion if IRQ1 is available to signal reset done */
        if (fwnode_irq_get_byname(dev_fwnode(dev), "irq1") >= 0) {
                if (!wait_for_completion_timeout(&st->reset_completion,
-                                                msecs_to_jiffies(1000))) {
-                       dev_err(dev, "Reset timeout after 1s\n");
-                       return -ETIMEDOUT;
-               }
+                                                msecs_to_jiffies(1000)))
+                       return dev_err_probe(dev, -ETIMEDOUT,
+                                            "Reset timeout after 1s\n");
        }
        /* If no IRQ available, reset is already complete after the 50ms delay above */