[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250905072423.368123-7-zhao.xichao@vivo.com>
Date: Fri, 5 Sep 2025 15:23:58 +0800
From: Xichao Zhao <zhao.xichao@...o.com>
To: Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>,
Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Zhang Rui <rui.zhang@...el.com>,
Lukasz Luba <lukasz.luba@....com>,
Guillaume La Roque <glaroque@...libre.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
Markus Mayer <mmayer@...adcom.com>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
zhanghongchen <zhanghongchen@...ngson.cn>,
Yinbo Zhu <zhuyinbo@...ngson.cn>,
Amit Kucheria <amitk@...nel.org>,
Thara Gopinath <thara.gopinath@...il.com>,
Niklas Söderlund <niklas.soderlund@...natech.se>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Magnus Damm <magnus.damm@...il.com>,
Heiko Stuebner <heiko@...ech.de>,
Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Alim Akhtar <alim.akhtar@...sung.com>,
Orson Zhai <orsonzhai@...il.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
Chunyan Zhang <zhang.lyra@...il.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Talel Shenhar <talel@...zon.com>,
Eduardo Valentin <edubezval@...il.com>,
Keerthy <j-keerthy@...com>,
Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
linux-hwmon@...r.kernel.org (open list:HARDWARE MONITORING),
linux-kernel@...r.kernel.org (open list),
linux-iio@...r.kernel.org (open list:IIO SUBSYSTEM AND DRIVERS),
linux-arm-kernel@...ts.infradead.org (moderated list:ARM/Allwinner sunXi SoC support),
linux-sunxi@...ts.linux.dev (open list:ARM/Allwinner sunXi SoC support),
linux-pm@...r.kernel.org (open list:THERMAL),
linux-amlogic@...ts.infradead.org (open list:THERMAL DRIVER FOR AMLOGIC SOCS),
linux-rpi-kernel@...ts.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE),
imx@...ts.linux.dev (open list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE),
linux-arm-msm@...r.kernel.org (open list:ARM/QUALCOMM MAILING LIST),
linux-renesas-soc@...r.kernel.org (open list:RENESAS R-CAR THERMAL DRIVERS),
linux-rockchip@...ts.infradead.org (open list:ARM/Rockchip SoC support),
linux-samsung-soc@...r.kernel.org (open list:SAMSUNG THERMAL DRIVER),
linux-stm32@...md-mailman.stormreply.com (moderated list:ARM/STM32 ARCHITECTURE),
linux-tegra@...r.kernel.org (open list:TEGRA ARCHITECTURE SUPPORT),
linux-omap@...r.kernel.org (open list:TI BANDGAP AND THERMAL DRIVER)
Cc: Xichao Zhao <zhao.xichao@...o.com>
Subject: [PATCH 06/12] thermal: broadcom: Remove redundant error log prints
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@...o.com>
---
drivers/thermal/broadcom/bcm2711_thermal.c | 7 ++-----
drivers/thermal/broadcom/bcm2835_thermal.c | 2 +-
drivers/thermal/broadcom/brcmstb_thermal.c | 3 +--
3 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/thermal/broadcom/bcm2711_thermal.c b/drivers/thermal/broadcom/bcm2711_thermal.c
index 03ac2d02e9d4..962dbec5e6ef 100644
--- a/drivers/thermal/broadcom/bcm2711_thermal.c
+++ b/drivers/thermal/broadcom/bcm2711_thermal.c
@@ -90,11 +90,8 @@ static int bcm2711_thermal_probe(struct platform_device *pdev)
thermal = devm_thermal_of_zone_register(dev, 0, priv,
&bcm2711_thermal_of_ops);
- if (IS_ERR(thermal)) {
- ret = PTR_ERR(thermal);
- dev_err(dev, "could not register sensor: %d\n", ret);
- return ret;
- }
+ if (IS_ERR(thermal))
+ return PTR_ERR(thermal);
priv->thermal = thermal;
diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c
index 685a5aee5e0d..c4205ae68e80 100644
--- a/drivers/thermal/broadcom/bcm2835_thermal.c
+++ b/drivers/thermal/broadcom/bcm2835_thermal.c
@@ -198,7 +198,7 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
/* register of thermal sensor and get info from DT */
tz = devm_thermal_of_zone_register(dev, 0, data, &bcm2835_thermal_ops);
if (IS_ERR(tz))
- return dev_err_probe(dev, PTR_ERR(tz), "Failed to register the thermal device\n");
+ return PTR_ERR(tz);
/*
* right now the FW does set up the HW-block, so we are not
diff --git a/drivers/thermal/broadcom/brcmstb_thermal.c b/drivers/thermal/broadcom/brcmstb_thermal.c
index f46f2ddc174e..efc8bfd04f68 100644
--- a/drivers/thermal/broadcom/brcmstb_thermal.c
+++ b/drivers/thermal/broadcom/brcmstb_thermal.c
@@ -346,8 +346,7 @@ static int brcmstb_thermal_probe(struct platform_device *pdev)
thermal = devm_thermal_of_zone_register(&pdev->dev, 0, priv,
of_ops);
if (IS_ERR(thermal))
- return dev_err_probe(&pdev->dev, PTR_ERR(thermal),
- "could not register sensor\n");
+ return PTR_ERR(thermal);
priv->thermal = thermal;
--
2.34.1
Powered by blists - more mailing lists