Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: temperature: mlx90635: Remove dev_err_probe() if error is -ENOMEM

The dev_err_probe() doesn't do anything when the error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just return the
value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Acked-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://patch.msgid.link/20250821080723.525379-8-zhao.xichao@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Xichao Zhao and committed by
Jonathan Cameron
1f539710 7216d7b9

+1 -1
+1 -1
drivers/iio/temperature/mlx90635.c
··· 939 939 940 940 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*mlx90635)); 941 941 if (!indio_dev) 942 - return dev_err_probe(&client->dev, -ENOMEM, "failed to allocate device\n"); 942 + return -ENOMEM; 943 943 944 944 regmap = devm_regmap_init_i2c(client, &mlx90635_regmap); 945 945 if (IS_ERR(regmap))