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

index 81dd2bfc22c05fb5a4826b2f6a9dcec916434d11..a75a83594a7eea6b6344e636e99107434ed46587 100644 (file)
@@ -607,10 +607,8 @@ static int stk3310_probe(struct i2c_client *client)
        struct stk3310_data *data;
 
        indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
-       if (!indio_dev) {
-               dev_err(&client->dev, "iio allocation failed!\n");
+       if (!indio_dev)
                return -ENOMEM;
-       }
 
        data = iio_priv(indio_dev);
        data->client = client;