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

index ae4ea587e7f93d1829210ef65c1aeddd86e02c56..c4bf5dc2f266ee6dc3f2602a62a99027353ab2d4 100644 (file)
@@ -1178,10 +1178,8 @@ static int mlx90632_probe(struct i2c_client *client)
        int ret;
 
        indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*mlx90632));
-       if (!indio_dev) {
-               dev_err(&client->dev, "Failed to allocate device\n");
+       if (!indio_dev)
                return -ENOMEM;
-       }
 
        regmap = devm_regmap_init_i2c(client, &mlx90632_regmap);
        if (IS_ERR(regmap)) {