Commit d0b297e7 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Daniel Lezcano

thermal/drivers/imx: Simplify with dev_err_probe()

Error handling in probe() can be a bit simpler with dev_err_probe().
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-8-241644e2b6e0@linaro.orgSigned-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent e9ac9024
...@@ -679,9 +679,7 @@ static int imx_thermal_probe(struct platform_device *pdev) ...@@ -679,9 +679,7 @@ static int imx_thermal_probe(struct platform_device *pdev)
data->thermal_clk = devm_clk_get(dev, NULL); data->thermal_clk = devm_clk_get(dev, NULL);
if (IS_ERR(data->thermal_clk)) { if (IS_ERR(data->thermal_clk)) {
ret = PTR_ERR(data->thermal_clk); ret = dev_err_probe(dev, PTR_ERR(data->thermal_clk), "failed to get thermal clk\n");
if (ret != -EPROBE_DEFER)
dev_err(dev, "failed to get thermal clk: %d\n", ret);
goto legacy_cleanup; goto legacy_cleanup;
} }
......
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