usb: gadget: tegra-xudc: Do not print errors on probe deferral
authorThierry Reding <treding@nvidia.com>
Thu, 6 Aug 2020 16:04:17 +0000 (18:04 +0200)
committerFelipe Balbi <balbi@kernel.org>
Fri, 2 Oct 2020 06:57:43 +0000 (09:57 +0300)
Probe deferral is an expected condition and can happen multiple times
during boot. Make sure not to output an error message in that case
because they are not useful.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/gadget/udc/tegra-xudc.c

index 606b70c2dec8863eb4cd6484c53746289e3b6ecd..580bef8eb4cbcc5403c7a5660b33eccf1772da74 100644 (file)
@@ -3781,7 +3781,9 @@ static int tegra_xudc_probe(struct platform_device *pdev)
 
        err = devm_clk_bulk_get(&pdev->dev, xudc->soc->num_clks, xudc->clks);
        if (err) {
-               dev_err(xudc->dev, "failed to request clocks: %d\n", err);
+               if (err != -EPROBE_DEFER)
+                       dev_err(xudc->dev, "failed to request clocks: %d\n", err);
+
                return err;
        }
 
@@ -3796,7 +3798,9 @@ static int tegra_xudc_probe(struct platform_device *pdev)
        err = devm_regulator_bulk_get(&pdev->dev, xudc->soc->num_supplies,
                                      xudc->supplies);
        if (err) {
-               dev_err(xudc->dev, "failed to request regulators: %d\n", err);
+               if (err != -EPROBE_DEFER)
+                       dev_err(xudc->dev, "failed to request regulators: %d\n", err);
+
                return err;
        }