From db935b8cac8bb091e884fe68231835234a266a85 Mon Sep 17 00:00:00 2001 From: Antoniu Miclaus Date: Mon, 30 Mar 2026 14:18:52 +0300 Subject: [PATCH] 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 --- drivers/iio/adc/ad7791.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iio/adc/ad7791.c b/drivers/iio/adc/ad7791.c index ab1ab0d88492..bcdc19e799aa 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)