Skip to content

Commit 301a5d3

Browse files
jaehyooarndb
authored andcommitted
soc: aspeed: lpc-ctrl: Block error printing on probe defer cases
Add a checking code when it gets -EPROBE_DEFER while getting a clock resource. In this case, it doesn't need to print out an error message because the probing will be re-visited. Signed-off-by: Jae Hyun Yoo <[email protected]> Signed-off-by: Joel Stanley <[email protected]> Reviewed-by: Andrew Jeffery <[email protected]> Reviewed-by: Iwona Winiarska <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected]' Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 0884005 commit 301a5d3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/soc/aspeed/aspeed-lpc-ctrl.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,9 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev)
306306
}
307307

308308
lpc_ctrl->clk = devm_clk_get(dev, NULL);
309-
if (IS_ERR(lpc_ctrl->clk)) {
310-
dev_err(dev, "couldn't get clock\n");
311-
return PTR_ERR(lpc_ctrl->clk);
312-
}
309+
if (IS_ERR(lpc_ctrl->clk))
310+
return dev_err_probe(dev, PTR_ERR(lpc_ctrl->clk),
311+
"couldn't get clock\n");
313312
rc = clk_prepare_enable(lpc_ctrl->clk);
314313
if (rc) {
315314
dev_err(dev, "couldn't enable clock\n");

0 commit comments

Comments
 (0)