diff options
| author | Xichao Zhao <zhao.xichao@vivo.com> | 2025-08-21 11:06:51 +0300 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-08-25 11:41:01 +0300 |
| commit | 1f53971032a582dc8bcc7d26acfcfe2bf1ae51d6 (patch) | |
| tree | 4c4f8646dade7588648e79c46d42aaa65954aa98 | |
| parent | 7216d7b9beb87f4afd62d737f024254ca3c0746c (diff) | |
| download | linux-1f53971032a582dc8bcc7d26acfcfe2bf1ae51d6.tar.xz | |
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>
| -rw-r--r-- | drivers/iio/temperature/mlx90635.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/temperature/mlx90635.c b/drivers/iio/temperature/mlx90635.c index 1175c7887ae1..0ba08504e990 100644 --- a/drivers/iio/temperature/mlx90635.c +++ b/drivers/iio/temperature/mlx90635.c @@ -939,7 +939,7 @@ static int mlx90635_probe(struct i2c_client *client) indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*mlx90635)); if (!indio_dev) - return dev_err_probe(&client->dev, -ENOMEM, "failed to allocate device\n"); + return -ENOMEM; regmap = devm_regmap_init_i2c(client, &mlx90635_regmap); if (IS_ERR(regmap)) |
