Skip to contentSkip to conversation

thermal: max77620: Remove duplicate error message

PATCH Applied Thierry Reding 2 participants 2 messages Oct 13, 2023 Thermal

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal: max77620: Remove duplicate error message

From: Thierry Reding <[email protected]>

The thermal_of_zone_register() function already prints an error message when appropriate, so remove the extra one from the MAX77620 thermal driver.

This fixes a spurious error message when no thermal zone was defined for the MAX77620 in device tree.

---
 drivers/thermal/max77620_thermal.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/thermal/max77620_thermal.c +2 -6
index 919b6ee208d8..85a12e98d6dc 100644
@@ -114,12 +114,8 @@ static int max77620_thermal_probe(struct platform_device *pdev)
 
 	mtherm->tz_device = devm_thermal_of_zone_register(&pdev->dev, 0,
 				mtherm, &max77620_thermal_ops);
-	if (IS_ERR(mtherm->tz_device)) {
-		ret = PTR_ERR(mtherm->tz_device);
-		dev_err(&pdev->dev, "Failed to register thermal zone: %d\n",
-			ret);
-		return ret;
-	}
+	if (IS_ERR(mtherm->tz_device))
+		return PTR_ERR(mtherm->tz_device);
 
 	ret = devm_request_threaded_irq(&pdev->dev, mtherm->irq_tjalarm1, NULL,
 					max77620_thermal_irq,
Signature · 1 line
2.42.0
#1 lore raw
Quoted 6 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The thermal_of_zone_register() function already prints an error message when appropriate, so remove the extra one from the MAX77620 thermal driver.

Quoted 6 lines

This fixes a spurious error message when no thermal zone was defined for the MAX77620 in device tree.

---

Applied, thanks

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog