Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: adc: ade9000: use dev_err_probe() in probe path

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>

authored by

Antoniu Miclaus and committed by
Jonathan Cameron
4b0d26cb 4d9fccb3

+3 -4
+3 -4
drivers/iio/adc/ade9000.c
··· 1589 1589 /* Only wait for completion if IRQ1 is available to signal reset done */ 1590 1590 if (fwnode_irq_get_byname(dev_fwnode(dev), "irq1") >= 0) { 1591 1591 if (!wait_for_completion_timeout(&st->reset_completion, 1592 - msecs_to_jiffies(1000))) { 1593 - dev_err(dev, "Reset timeout after 1s\n"); 1594 - return -ETIMEDOUT; 1595 - } 1592 + msecs_to_jiffies(1000))) 1593 + return dev_err_probe(dev, -ETIMEDOUT, 1594 + "Reset timeout after 1s\n"); 1596 1595 } 1597 1596 /* If no IRQ available, reset is already complete after the 50ms delay above */ 1598 1597