Skip to content

Commit 5368084

Browse files
thierryredingdlezcano
authored andcommitted
thermal/drivers/max77620: Remove duplicate error message
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. Reported-by: Nicolas Chauvet <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e9cdce5 commit 5368084

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/thermal/max77620_thermal.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,8 @@ static int max77620_thermal_probe(struct platform_device *pdev)
114114

115115
mtherm->tz_device = devm_thermal_of_zone_register(&pdev->dev, 0,
116116
mtherm, &max77620_thermal_ops);
117-
if (IS_ERR(mtherm->tz_device)) {
118-
ret = PTR_ERR(mtherm->tz_device);
119-
dev_err(&pdev->dev, "Failed to register thermal zone: %d\n",
120-
ret);
121-
return ret;
122-
}
117+
if (IS_ERR(mtherm->tz_device))
118+
return PTR_ERR(mtherm->tz_device);
123119

124120
ret = devm_request_threaded_irq(&pdev->dev, mtherm->irq_tjalarm1, NULL,
125121
max77620_thermal_irq,

0 commit comments

Comments
 (0)