Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit d0b297e

Browse files
krzkdlezcano
authored andcommitted
thermal/drivers/imx: Simplify with dev_err_probe()
Error handling in probe() can be a bit simpler with dev_err_probe(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-8-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent e9ac902 commit d0b297e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/thermal/imx_thermal.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -679,9 +679,7 @@ static int imx_thermal_probe(struct platform_device *pdev)
679679

680680
data->thermal_clk = devm_clk_get(dev, NULL);
681681
if (IS_ERR(data->thermal_clk)) {
682-
ret = PTR_ERR(data->thermal_clk);
683-
if (ret != -EPROBE_DEFER)
684-
dev_err(dev, "failed to get thermal clk: %d\n", ret);
682+
ret = dev_err_probe(dev, PTR_ERR(data->thermal_clk), "failed to get thermal clk\n");
685683
goto legacy_cleanup;
686684
}
687685

0 commit comments

Comments
 (0)