[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250821080723.525379-8-zhao.xichao@vivo.com>
Date: Thu, 21 Aug 2025 16:06:51 +0800
From: Xichao Zhao <zhao.xichao@...o.com>
To: Crt Mori <cmo@...exis.com>,
Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
linux-iio@...r.kernel.org (open list:MELEXIS MLX90635 DRIVER),
linux-kernel@...r.kernel.org (open list)
Cc: Xichao Zhao <zhao.xichao@...o.com>
Subject: [PATCH 7/7] iio: temperature: mlx90635: Remove dev_err_probe() if error is -ENOMEM
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