[PATCH 08/12] thermal: renesas: Remove redundant error log prints
Xichao Zhao
zhao.xichao at vivo.com
Fri Sep 5 00:24:00 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/renesas/rcar_gen3_thermal.c | 1 -
drivers/thermal/renesas/rcar_thermal.c | 3 ++-
drivers/thermal/renesas/rzg2l_thermal.c | 1 -
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/thermal/renesas/rcar_gen3_thermal.c b/drivers/thermal/renesas/rcar_gen3_thermal.c
index 24a702ee4c1f..4788fd311887 100644
--- a/drivers/thermal/renesas/rcar_gen3_thermal.c
+++ b/drivers/thermal/renesas/rcar_gen3_thermal.c
@@ -540,7 +540,6 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
zone = devm_thermal_of_zone_register(dev, i, tsc, &priv->ops);
if (IS_ERR(zone)) {
- dev_err(dev, "Sensor %u: Can't register thermal zone\n", i);
ret = PTR_ERR(zone);
goto error_unregister;
}
diff --git a/drivers/thermal/renesas/rcar_thermal.c b/drivers/thermal/renesas/rcar_thermal.c
index fdd7afdc4ff6..a623f21520ef 100644
--- a/drivers/thermal/renesas/rcar_thermal.c
+++ b/drivers/thermal/renesas/rcar_thermal.c
@@ -498,9 +498,10 @@ static int rcar_thermal_probe(struct platform_device *pdev)
thermal_zone_device_unregister(priv->zone);
priv->zone = ERR_PTR(ret);
}
+ if (IS_ERR(priv->zone))
+ dev_err(dev, "can't register thermal zone\n");
}
if (IS_ERR(priv->zone)) {
- dev_err(dev, "can't register thermal zone\n");
ret = PTR_ERR(priv->zone);
priv->zone = NULL;
goto error_unregister;
diff --git a/drivers/thermal/renesas/rzg2l_thermal.c b/drivers/thermal/renesas/rzg2l_thermal.c
index b588be628640..3b13ccd5e76a 100644
--- a/drivers/thermal/renesas/rzg2l_thermal.c
+++ b/drivers/thermal/renesas/rzg2l_thermal.c
@@ -208,7 +208,6 @@ static int rzg2l_thermal_probe(struct platform_device *pdev)
zone = devm_thermal_of_zone_register(dev, 0, priv,
&rzg2l_tz_of_ops);
if (IS_ERR(zone)) {
- dev_err(dev, "Can't register thermal zone");
ret = PTR_ERR(zone);
goto err;
}
--
2.34.1
More information about the linux-amlogic
mailing list