pwm: imx27: Eliminate error message for defer probe
authorAnson Huang <Anson.Huang@nxp.com>
Mon, 30 Dec 2019 03:02:40 +0000 (11:02 +0800)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 20 Jan 2020 12:20:21 +0000 (13:20 +0100)
For defer probe error, no need to output error message which
will cause confusion.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-imx27.c

index 59d8b12..35a7ac4 100644 (file)
@@ -319,9 +319,13 @@ static int pwm_imx27_probe(struct platform_device *pdev)
 
        imx->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
        if (IS_ERR(imx->clk_ipg)) {
-               dev_err(&pdev->dev, "getting ipg clock failed with %ld\n",
-                               PTR_ERR(imx->clk_ipg));
-               return PTR_ERR(imx->clk_ipg);
+               int ret = PTR_ERR(imx->clk_ipg);
+
+               if (ret != -EPROBE_DEFER)
+                       dev_err(&pdev->dev,
+                               "getting ipg clock failed with %d\n",
+                               ret);
+               return ret;
        }
 
        imx->clk_per = devm_clk_get(&pdev->dev, "per");