usb: chipidea: imx: avoid EPROBE_DEFER printed as error
authorStefan Agner <stefan@agner.ch>
Thu, 28 Jan 2016 00:55:45 +0000 (16:55 -0800)
committerPeter Chen <peter.chen@nxp.com>
Mon, 29 Feb 2016 05:37:52 +0000 (13:37 +0800)
Avoid printing an error if adding the device failes with return
value EPROBE_DEFFER. This may happen e.g. due to missing GPIO for
the vbus-supply regulator.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
drivers/usb/chipidea/ci_hdrc_imx.c

index 1622b0dbc25a8d0c989cfe4268d9c3a19d790f88..9ce8c9f9167484a064e32feef10d90586b9854e8 100644 (file)
@@ -307,9 +307,9 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
                                &pdata);
        if (IS_ERR(data->ci_pdev)) {
                ret = PTR_ERR(data->ci_pdev);
-               dev_err(&pdev->dev,
-                       "Can't register ci_hdrc platform device, err=%d\n",
-                       ret);
+               if (ret != -EPROBE_DEFER)
+                       dev_err(&pdev->dev,
+                               "ci_hdrc_add_device failed, err=%d\n", ret);
                goto err_clk;
        }