]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
thermal/drivers/max77620: Remove duplicate error message
authorThierry Reding <treding@nvidia.com>
Fri, 13 Oct 2023 15:51:04 +0000 (17:51 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Sun, 15 Oct 2023 21:40:10 +0000 (23:40 +0200)
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 <kwizart@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20231013155104.1781197-1-thierry.reding@gmail.com
drivers/thermal/max77620_thermal.c

index 919b6ee208d81a00ce5c4e1646e555296203c1c6..85a12e98d6dcf79b9cc7b21985aae53a089f0a35 100644 (file)
@@ -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,