]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: health: Drop unnecessary -ENOMEM messages
authorDixit Parmar <dixitparmar19@gmail.com>
Fri, 22 Aug 2025 03:49:52 +0000 (09:19 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 25 Aug 2025 11:35:25 +0000 (12:35 +0100)
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>
drivers/iio/health/afe4403.c
drivers/iio/health/afe4404.c

index 99bf1bcbea40d9f7f224d2969e8479203ff9458b..0e5a512e3bb8f0f46a14a3c43ae21e532b5ba307 100644 (file)
@@ -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);
 
index 29e030943f599b464634c483452ce9b623a16248..768d794e574b9af17de6f81bb037c54b1885f244 100644 (file)
@@ -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);