Commit 7d8abc5f authored by Alexander Stein's avatar Alexander Stein Committed by Daniel Lezcano

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: default avatarAlexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20240717085517.3333385-1-alexander.stein@ew.tq-group.comSigned-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent 14ed0ef0
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment