[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 Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux