[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKv63usy7FsiUCjrqibcr196kVGb5_FDeU__OwLWJxasb3MgZg@mail.gmail.com>
Date: Thu, 21 Aug 2025 13:46:19 +0200
From: Crt Mori <cmo@...exis.com>
To: Xichao Zhao <zhao.xichao@...o.com>
Cc: Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
"open list:MELEXIS MLX90635 DRIVER" <linux-iio@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 7/7] iio: temperature: mlx90635: Remove dev_err_probe() if
error is -ENOMEM
I am not sure I agree with this. It provides an error message with
reason and I understand we want as few as possible, but this would be
a valid remark inside the logs?
On Thu, 21 Aug 2025 at 10:08, Xichao Zhao <zhao.xichao@...o.com> wrote:
>
> The dev_err_probe() doesn't do anything when 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@...o.com>
> ---
> drivers/iio/temperature/mlx90635.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/temperature/mlx90635.c b/drivers/iio/temperature/mlx90635.c
> index f7f88498ba0e..6d386d887855 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))
> --
> 2.34.1
>
Powered by blists - more mailing lists