summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDixit Parmar <dixitparmar19@gmail.com>2025-08-22 06:49:52 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2025-08-25 14:35:25 +0300
commitfc3a8049293cef455fc585cfd36892e3992aeb14 (patch)
treea0a014f7783e33f2c1c57b73469dd1a33101dbb7
parenteeca066c9d990450017d141e993cf051aac2c430 (diff)
downloadlinux-fc3a8049293cef455fc585cfd36892e3992aeb14.tar.xz
iio: health: Drop unnecessary -ENOMEM messages
The drivers do not require their own error messages for error -ENOMEM, memory allocation failures. So remove the dev_err() messages from the probe(). Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com> Link: https://patch.msgid.link/20250822-enomam_logs-v1-4-db87f2974552@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/health/afe4403.c4
-rw-r--r--drivers/iio/health/afe4404.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/drivers/iio/health/afe4403.c b/drivers/iio/health/afe4403.c
index 99bf1bcbea40..0e5a512e3bb8 100644
--- a/drivers/iio/health/afe4403.c
+++ b/drivers/iio/health/afe4403.c
@@ -529,10 +529,8 @@ static int afe4403_probe(struct spi_device *spi)
"%s-dev%d",
indio_dev->name,
iio_device_id(indio_dev));
- if (!afe->trig) {
- dev_err(dev, "Unable to allocate IIO trigger\n");
+ if (!afe->trig)
return -ENOMEM;
- }
iio_trigger_set_drvdata(afe->trig, indio_dev);
diff --git a/drivers/iio/health/afe4404.c b/drivers/iio/health/afe4404.c
index 29e030943f59..768d794e574b 100644
--- a/drivers/iio/health/afe4404.c
+++ b/drivers/iio/health/afe4404.c
@@ -536,10 +536,8 @@ static int afe4404_probe(struct i2c_client *client)
"%s-dev%d",
indio_dev->name,
iio_device_id(indio_dev));
- if (!afe->trig) {
- dev_err(dev, "Unable to allocate IIO trigger\n");
+ if (!afe->trig)
return -ENOMEM;
- }
iio_trigger_set_drvdata(afe->trig, indio_dev);