Skip to content

Commit 7d8abc5

Browse files
tq-steinadlezcano
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
1 parent 14ed0ef commit 7d8abc5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/thermal/imx_sc_thermal.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ static int imx_sc_thermal_probe(struct platform_device *pdev)
111111
if (ret == -ENODEV)
112112
continue;
113113

114-
dev_err(&pdev->dev, "failed to register thermal zone\n");
115-
return ret;
114+
return dev_err_probe(&pdev->dev, ret, "failed to register thermal zone\n");
116115
}
117116

118117
devm_thermal_add_hwmon_sysfs(&pdev->dev, sensor->tzd);

0 commit comments

Comments
 (0)