phy: qcom-qusb2: Quiet -EPROBE_DEFER from qusb2_phy_probe()
authorDouglas Anderson <dianders@chromium.org>
Mon, 14 May 2018 22:42:22 +0000 (15:42 -0700)
committerKishon Vijay Abraham I <kishon@ti.com>
Mon, 10 Sep 2018 08:56:37 +0000 (14:26 +0530)
The -EPROBE_DEFER virus demands special case code to avoid printing
error messages when the error is only -EPROBE_DEFER.  Spread the virus
to a new host: qusb2_phy_probe().  Specifically handle when our
regulators might not be ready yet.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/qualcomm/phy-qcom-qusb2.c

index e70e425..9ce5311 100644 (file)
@@ -800,7 +800,9 @@ static int qusb2_phy_probe(struct platform_device *pdev)
 
        ret = devm_regulator_bulk_get(dev, num, qphy->vregs);
        if (ret) {
-               dev_err(dev, "failed to get regulator supplies\n");
+               if (ret != -EPROBE_DEFER)
+                       dev_err(dev, "failed to get regulator supplies: %d\n",
+                               ret);
                return ret;
        }