[PATCH 10/12] thermal: st: Remove redundant error log prints
Xichao Zhao
zhao.xichao at vivo.com
Fri Sep 5 00:24:02 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/thermal/st/st_thermal.c | 1 -
drivers/thermal/st/stm_thermal.c | 8 ++------
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/thermal/st/st_thermal.c b/drivers/thermal/st/st_thermal.c
index 1470ca519def..6d0c163658c4 100644
--- a/drivers/thermal/st/st_thermal.c
+++ b/drivers/thermal/st/st_thermal.c
@@ -198,7 +198,6 @@ int st_thermal_register(struct platform_device *pdev,
sensor->thermal_dev =
devm_thermal_of_zone_register(dev, 0, sensor, &st_tz_ops);
if (IS_ERR(sensor->thermal_dev)) {
- dev_err(dev, "failed to register thermal of zone\n");
ret = PTR_ERR(sensor->thermal_dev);
goto sensor_off;
}
diff --git a/drivers/thermal/st/stm_thermal.c b/drivers/thermal/st/stm_thermal.c
index 6e90eb9f414d..963c347d0ef5 100644
--- a/drivers/thermal/st/stm_thermal.c
+++ b/drivers/thermal/st/stm_thermal.c
@@ -536,12 +536,8 @@ static int stm_thermal_probe(struct platform_device *pdev)
sensor,
&stm_tz_ops);
- if (IS_ERR(sensor->th_dev)) {
- dev_err(&pdev->dev, "%s: thermal zone sensor registering KO\n",
- __func__);
- ret = PTR_ERR(sensor->th_dev);
- return ret;
- }
+ if (IS_ERR(sensor->th_dev))
+ return PTR_ERR(sensor->th_dev);
/* Register IRQ into GIC */
ret = stm_register_irq(sensor);
--
2.34.1
More information about the linux-amlogic
mailing list