summaryrefslogtreecommitdiff
path: root/drivers/thermal/imx_sc_thermal.c
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@ew.tq-group.com>2024-07-17 10:55:16 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2024-09-04 15:31:29 +0200
commit7d8abc5f3b5ce0f53d499279d8defc0f72bf7557 (patch)
tree6d83c252a89d5b49e7bafbe71f2f4d3cf7cf2d0b /drivers/thermal/imx_sc_thermal.c
parent14ed0ef0a27a0646ecd7dc6f61cde3f6ba2b303b (diff)
thermal/drivers/imx_sc_thermal: Use dev_err_probe
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>
Diffstat (limited to 'drivers/thermal/imx_sc_thermal.c')
-rw-r--r--drivers/thermal/imx_sc_thermal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c
index 7224f8d21db9..88558ce58880 100644
--- a/drivers/thermal/imx_sc_thermal.c
+++ b/drivers/thermal/imx_sc_thermal.c
@@ -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);