From: Antoniu Miclaus Date: Mon, 30 Mar 2026 11:18:52 +0000 (+0300) Subject: iio: adc: ad7791: use dev_err_probe() X-Git-Tag: v7.2-rc1~67^2~5^2~239 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=db935b8cac8bb091e884fe68231835234a266a85;p=thirdparty%2Fkernel%2Flinux.git iio: adc: ad7791: use dev_err_probe() Use dev_err_probe() instead of dev_err() in the probe path to ensure proper handling of deferred probing and to simplify error handling. Signed-off-by: Antoniu Miclaus Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/ad7791.c b/drivers/iio/adc/ad7791.c index ab1ab0d88492b..bcdc19e799aaf 100644 --- a/drivers/iio/adc/ad7791.c +++ b/drivers/iio/adc/ad7791.c @@ -413,10 +413,8 @@ static int ad7791_probe(struct spi_device *spi) struct ad7791_state *st; int ret; - if (!spi->irq) { - dev_err(&spi->dev, "Missing IRQ.\n"); - return -ENXIO; - } + if (!spi->irq) + return dev_err_probe(dev, -ENXIO, "Missing IRQ.\n"); indio_dev = devm_iio_device_alloc(dev, sizeof(*st)); if (!indio_dev)