From: Antoniu Miclaus Date: Mon, 30 Mar 2026 11:18:56 +0000 (+0300) Subject: iio: adc: ad4062: use dev_err_probe() X-Git-Tag: v7.2-rc1~67^2~5^2~235 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=5bcbbcfb7c91b9ab759397d7ca5b317a87284665;p=thirdparty%2Flinux.git iio: adc: ad4062: 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/ad4062.c b/drivers/iio/adc/ad4062.c index 222499a45b9b4..8e5984055b159 100644 --- a/drivers/iio/adc/ad4062.c +++ b/drivers/iio/adc/ad4062.c @@ -436,10 +436,9 @@ static int ad4062_check_ids(struct ad4062_state *st) return ret; val = be16_to_cpu(st->buf.be16); - if (val != AD4062_I3C_VENDOR) { - dev_err(dev, "Vendor ID x%x does not match expected value\n", val); - return -ENODEV; - } + if (val != AD4062_I3C_VENDOR) + return dev_err_probe(dev, -ENODEV, + "Vendor ID x%x does not match expected value\n", val); return 0; }