summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoniu Miclaus <antoniu.miclaus@analog.com>2026-03-30 14:18:56 +0300
committerJonathan Cameron <jic23@kernel.org>2026-04-27 09:58:18 +0100
commit5bcbbcfb7c91b9ab759397d7ca5b317a87284665 (patch)
treeca80a7ed0e48168ba0f4a721e2df5d530e05624e
parent8b6e7388290f71cad96fb5f9279ec7c933f40258 (diff)
downloadlinux-5bcbbcfb7c91b9ab759397d7ca5b317a87284665.tar.gz
linux-5bcbbcfb7c91b9ab759397d7ca5b317a87284665.zip
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 <antoniu.miclaus@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/adc/ad4062.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/iio/adc/ad4062.c b/drivers/iio/adc/ad4062.c
index 222499a45b9b..8e5984055b15 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;
}