Skip to content

Commit

Permalink
thermal/drivers/imx_sc_thermal: Use dev_err_probe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Stein authored and Daniel Lezcano committed Sep 4, 2024
1 parent 14ed0ef commit 7d8abc5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/thermal/imx_sc_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7d8abc5

Please sign in to comment.