]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: potentiostat: Drop unnecessary -ENOMEM messages
authorDixit Parmar <dixitparmar19@gmail.com>
Fri, 22 Aug 2025 03:49:55 +0000 (09:19 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 25 Aug 2025 11:36:29 +0000 (12:36 +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-7-db87f2974552@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/potentiostat/lmp91000.c

index 030498d0b7638081ea865d01a6398b608f2f143d..eccc2a34358f07253e1581a5ab19abf83b86ea7c 100644 (file)
@@ -321,10 +321,8 @@ static int lmp91000_probe(struct i2c_client *client)
        data->trig = devm_iio_trigger_alloc(dev, "%s-mux%d",
                                            indio_dev->name,
                                            iio_device_id(indio_dev));
-       if (!data->trig) {
-               dev_err(dev, "cannot allocate iio trigger.\n");
+       if (!data->trig)
                return -ENOMEM;
-       }
 
        init_completion(&data->completion);