From: Antoniu Miclaus Date: Fri, 13 Mar 2026 11:57:44 +0000 (+0200) Subject: iio: frequency: ad9523: use dev_err_probe X-Git-Tag: v7.1-rc1~17^2~120^2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6849c6356bc314f40328d67f8a8fc8e207b28c29;p=thirdparty%2Fkernel%2Fstable.git iio: frequency: ad9523: 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 Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c index f4e80ea0c6d29..ea4d2763564a3 100644 --- a/drivers/iio/frequency/ad9523.c +++ b/drivers/iio/frequency/ad9523.c @@ -955,10 +955,8 @@ static int ad9523_probe(struct spi_device *spi) int ret; pdata = dev_get_platdata(dev); - if (!pdata) { - dev_err(&spi->dev, "no platform data?\n"); - return -EINVAL; - } + if (!pdata) + return dev_err_probe(dev, -EINVAL, "no platform data?\n"); indio_dev = devm_iio_device_alloc(dev, sizeof(*st)); if (indio_dev == NULL)