Commit ece222e9 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Philipp Zabel

reset: lpc18xx: simplify with dev_err_probe()

Use dev_err_probe() to avoid dmesg flood on actual defer.  This makes
the code also simpler.
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Acked-by: default avatarVladimir Zapolskiy <vz@mleia.com>
Reviewed-by: default avatarVladimir Zapolskiy <vz@mleia.com>
Link: https://lore.kernel.org/r/20240825-reset-cleanup-scoped-v1-4-03f6d834f8c0@linaro.orgSigned-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 3ec21e7f
......@@ -151,16 +151,14 @@ static int lpc18xx_rgu_probe(struct platform_device *pdev)
return PTR_ERR(rc->base);
rc->clk_reg = devm_clk_get(&pdev->dev, "reg");
if (IS_ERR(rc->clk_reg)) {
dev_err(&pdev->dev, "reg clock not found\n");
return PTR_ERR(rc->clk_reg);
}
if (IS_ERR(rc->clk_reg))
return dev_err_probe(&pdev->dev, PTR_ERR(rc->clk_reg),
"reg clock not found\n");
rc->clk_delay = devm_clk_get(&pdev->dev, "delay");
if (IS_ERR(rc->clk_delay)) {
dev_err(&pdev->dev, "delay clock not found\n");
return PTR_ERR(rc->clk_delay);
}
if (IS_ERR(rc->clk_delay))
return dev_err_probe(&pdev->dev, PTR_ERR(rc->clk_delay),
"delay clock not found\n");
ret = clk_prepare_enable(rc->clk_reg);
if (ret) {
......
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