[PATCH 02/12] hwmon: Remove redundant error log prints
Xichao Zhao
zhao.xichao at vivo.com
Fri Sep 5 00:23:54 PDT 2025
devm_thermal_of_zone_register() prints error log messages when
it fails, so there is no need to print error log messages again.
Signed-off-by: Xichao Zhao <zhao.xichao at vivo.com>
---
drivers/hwmon/hwmon.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
index 1688c210888a..0514e4bc5e71 100644
--- a/drivers/hwmon/hwmon.c
+++ b/drivers/hwmon/hwmon.c
@@ -239,8 +239,7 @@ static int hwmon_thermal_add_sensor(struct device *dev, int index)
if (IS_ERR(tzd)) {
if (PTR_ERR(tzd) != -ENODEV)
return PTR_ERR(tzd);
- dev_info(dev, "temp%d_input not attached to any thermal zone\n",
- index + 1);
+
devm_kfree(dev, tdata);
return 0;
}
--
2.34.1
More information about the linux-amlogic
mailing list