[PATCH 06/12] thermal: broadcom: Remove redundant error log prints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
 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





[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux