Skip to content

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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
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)