[PATCH 11/12] thermal: tegra: Remove redundant error log prints
Xichao Zhao
zhao.xichao at vivo.com
Fri Sep 5 00:24:03 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/tegra/soctherm.c | 2 --
drivers/thermal/tegra/tegra30-tsensor.c | 3 +--
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c
index 53a5c649f4b1..3db20d34f88c 100644
--- a/drivers/thermal/tegra/soctherm.c
+++ b/drivers/thermal/tegra/soctherm.c
@@ -2186,8 +2186,6 @@ static int tegra_soctherm_probe(struct platform_device *pdev)
&tegra_of_thermal_ops);
if (IS_ERR(z)) {
err = PTR_ERR(z);
- dev_err(&pdev->dev, "failed to register sensor: %d\n",
- err);
goto disable_clocks;
}
diff --git a/drivers/thermal/tegra/tegra30-tsensor.c b/drivers/thermal/tegra/tegra30-tsensor.c
index 6245f6b97f43..7bb9776c4172 100644
--- a/drivers/thermal/tegra/tegra30-tsensor.c
+++ b/drivers/thermal/tegra/tegra30-tsensor.c
@@ -517,8 +517,7 @@ static int tegra_tsensor_register_channel(struct tegra_tsensor *ts,
tsc->tzd = devm_thermal_of_zone_register(ts->dev, id, tsc, &ops);
if (IS_ERR(tsc->tzd)) {
if (PTR_ERR(tsc->tzd) != -ENODEV)
- return dev_err_probe(ts->dev, PTR_ERR(tsc->tzd),
- "failed to register thermal zone\n");
+ return PTR_ERR(tsc->tzd);
/*
* It's okay if sensor isn't assigned to any thermal zone
--
2.34.1
More information about the linux-amlogic
mailing list