net: stmmac: Do not output error on deferred probe
authorThierry Reding <treding@nvidia.com>
Mon, 27 May 2019 10:52:51 +0000 (12:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 May 2019 18:00:09 +0000 (11:00 -0700)
If the subdriver defers probe, do not show an error message. It's
perfectly fine for this error to occur since the driver will get another
chance to probe after some time and will usually succeed after all of
the resources that it requires have been registered.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c

index 3256e5cbad2717c0d3928109cbb677c095e3247c..5bc224834c771e70fb63e9811172cb002d0737fb 100644 (file)
@@ -455,7 +455,11 @@ static int dwc_eth_dwmac_probe(struct platform_device *pdev)
        priv = data->probe(pdev, plat_dat, &stmmac_res);
        if (IS_ERR(priv)) {
                ret = PTR_ERR(priv);
-               dev_err(&pdev->dev, "failed to probe subdriver: %d\n", ret);
+
+               if (ret != -EPROBE_DEFER)
+                       dev_err(&pdev->dev, "failed to probe subdriver: %d\n",
+                               ret);
+
                goto remove_config;
        }