[PATCH 04/12] regulator: max8973: 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/regulator/max8973-regulator.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c
index f68caa07f546..9853a7a5850b 100644
--- a/drivers/regulator/max8973-regulator.c
+++ b/drivers/regulator/max8973-regulator.c
@@ -478,12 +478,8 @@ static int max8973_thermal_init(struct max8973_chip *mchip)
 
 	tzd = devm_thermal_of_zone_register(mchip->dev, 0, mchip,
 					    &max77621_tz_ops);
-	if (IS_ERR(tzd)) {
-		ret = PTR_ERR(tzd);
-		dev_err(mchip->dev, "Failed to register thermal sensor: %d\n",
-			ret);
-		return ret;
-	}
+	if (IS_ERR(tzd))
+		return PTR_ERR(tzd);
 
 	if (mchip->irq <= 0)
 		return 0;
-- 
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