Commit 46d6cbb8 authored by Ye Xingchen's avatar Ye Xingchen Committed by Daniel Lezcano

thermal: amlogic: Use dev_err_probe()

Replace the open-code with dev_err_probe() to simplify the code.
Signed-off-by: default avatarYe Xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/202303241020110014476@zte.com.cn
parent 13f03bcd
...@@ -262,11 +262,8 @@ static int amlogic_thermal_probe(struct platform_device *pdev) ...@@ -262,11 +262,8 @@ static int amlogic_thermal_probe(struct platform_device *pdev)
return PTR_ERR(pdata->regmap); return PTR_ERR(pdata->regmap);
pdata->clk = devm_clk_get(dev, NULL); pdata->clk = devm_clk_get(dev, NULL);
if (IS_ERR(pdata->clk)) { if (IS_ERR(pdata->clk))
if (PTR_ERR(pdata->clk) != -EPROBE_DEFER) return dev_err_probe(dev, PTR_ERR(pdata->clk), "failed to get clock\n");
dev_err(dev, "failed to get clock\n");
return PTR_ERR(pdata->clk);
}
pdata->sec_ao_map = syscon_regmap_lookup_by_phandle pdata->sec_ao_map = syscon_regmap_lookup_by_phandle
(pdev->dev.of_node, "amlogic,ao-secure"); (pdev->dev.of_node, "amlogic,ao-secure");
......
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