[PATCH] hwmon: (sfctemp) Simplify error message

Christophe JAILLET posted 1 patch 2 years, 8 months ago
drivers/hwmon/sfctemp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] hwmon: (sfctemp) Simplify error message
Posted by Christophe JAILLET 2 years, 8 months ago
dev_err_probe() already display the error code. There is no need to
duplicate it explicitly in the error message.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/hwmon/sfctemp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/sfctemp.c b/drivers/hwmon/sfctemp.c
index d7484e2b8100..fb1da93383d7 100644
--- a/drivers/hwmon/sfctemp.c
+++ b/drivers/hwmon/sfctemp.c
@@ -303,7 +303,7 @@ static int sfctemp_probe(struct platform_device *pdev)
 
 	ret = sfctemp_enable(sfctemp);
 	if (ret)
-		return dev_err_probe(dev, ret, "error enabling temperature sensor: %d\n", ret);
+		return dev_err_probe(dev, ret, "error enabling temperature sensor\n");
 
 	hwmon_dev = devm_hwmon_device_register_with_info(dev, "sfctemp", sfctemp,
 							 &sfctemp_chip_info, NULL);
-- 
2.34.1
Re: [PATCH] hwmon: (sfctemp) Simplify error message
Posted by Guenter Roeck 2 years, 8 months ago
On Sat, Apr 15, 2023 at 06:23:37PM +0200, Christophe JAILLET wrote:
> dev_err_probe() already display the error code. There is no need to
> duplicate it explicitly in the error message.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Applied.

Thanks,
Guenter