net: stmmac: Do not output error on deferred probe

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>
This commit is contained in:
Thierry Reding 2019-05-27 12:52:51 +02:00 committed by David S. Miller
parent c3cf73c7a2
commit 54ed6fd2e0
1 changed files with 5 additions and 1 deletions

View 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;
}