summaryrefslogtreecommitdiff
path: root/drivers/iio/amplifiers
diff options
context:
space:
mode:
authorDavid Lechner <dlechner@baylibre.com>2025-06-11 16:33:05 -0500
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2025-06-26 19:32:55 +0100
commit51180f03eb6f5ee82a620af534efff12d272bb86 (patch)
treeec07f407d264875ed6cbd459bab2ff5d2298e3b0 /drivers/iio/amplifiers
parente905b3dd3a735bda21ac09f24ed542d72aad942e (diff)
iio: amplifiers: ada4250: use dev_err_probe()
Use dev_err_probe() when returning an error in the probe function. Signed-off-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250611-iio-amplifiers-ada4250-simplify-data-buffer-in-init-v3-5-bf85ddea79f2@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/amplifiers')
-rw-r--r--drivers/iio/amplifiers/ada4250.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/iio/amplifiers/ada4250.c b/drivers/iio/amplifiers/ada4250.c
index d20ca410c506..40f396ea9069 100644
--- a/drivers/iio/amplifiers/ada4250.c
+++ b/drivers/iio/amplifiers/ada4250.c
@@ -351,10 +351,8 @@ static int ada4250_probe(struct spi_device *spi)
mutex_init(&st->lock);
ret = ada4250_init(st);
- if (ret) {
- dev_err(&spi->dev, "ADA4250 init failed\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(&spi->dev, ret, "ADA4250 init failed\n");
return devm_iio_device_register(&spi->dev, indio_dev);
}