]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
thermal/drivers/imx_sc_thermal: Use dev_err_probe
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Wed, 17 Jul 2024 08:55:16 +0000 (10:55 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 4 Sep 2024 13:31:29 +0000 (15:31 +0200)
This adds the error code to the error message and also stores that
message in case of probe deferral.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20240717085517.3333385-1-alexander.stein@ew.tq-group.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/imx_sc_thermal.c

index 7224f8d21db97e3e4d952e5fc3c789fa5a5f5b4f..88558ce588807a0492536697e1a4a1582fbe1f63 100644 (file)
@@ -111,8 +111,7 @@ static int imx_sc_thermal_probe(struct platform_device *pdev)
                        if (ret == -ENODEV)
                                continue;
 
-                       dev_err(&pdev->dev, "failed to register thermal zone\n");
-                       return ret;
+                       return dev_err_probe(&pdev->dev, ret, "failed to register thermal zone\n");
                }
 
                devm_thermal_add_hwmon_sysfs(&pdev->dev, sensor->tzd);