]> Git Repo - linux.git/commitdiff
soc: aspeed: lpc-ctrl: Block error printing on probe defer cases
authorJae Hyun Yoo <[email protected]>
Tue, 1 Feb 2022 07:01:18 +0000 (17:31 +1030)
committerArnd Bergmann <[email protected]>
Tue, 8 Feb 2022 08:52:59 +0000 (09:52 +0100)
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]>
drivers/soc/aspeed/aspeed-lpc-ctrl.c

index 72771e018c42eae059d2c7adaf2c4cfd7e412856..258894ed234b3ddc3709a7d75251d45c55eeb862 100644 (file)
@@ -306,10 +306,9 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev)
        }
 
        lpc_ctrl->clk = devm_clk_get(dev, NULL);
-       if (IS_ERR(lpc_ctrl->clk)) {
-               dev_err(dev, "couldn't get clock\n");
-               return PTR_ERR(lpc_ctrl->clk);
-       }
+       if (IS_ERR(lpc_ctrl->clk))
+               return dev_err_probe(dev, PTR_ERR(lpc_ctrl->clk),
+                                    "couldn't get clock\n");
        rc = clk_prepare_enable(lpc_ctrl->clk);
        if (rc) {
                dev_err(dev, "couldn't enable clock\n");
This page took 0.055855 seconds and 4 git commands to generate.