net: stmmac: honor error code from stmmac_dt_phy()

Honor error code from stmmac_dt_phy() instead of always
returning -ENODEV.

No functional change intended.

Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Niklas Cassel 2018-02-19 18:11:15 +01:00 committed by David S. Miller
parent 2ee2132ffb
commit ce339abc9a
1 changed files with 3 additions and 2 deletions

View File

@ -417,8 +417,9 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
dev_warn(&pdev->dev, "snps,phy-addr property is deprecated\n");
/* To Configure PHY by using all device-tree supported properties */
if (stmmac_dt_phy(plat, np, &pdev->dev))
return ERR_PTR(-ENODEV);
rc = stmmac_dt_phy(plat, np, &pdev->dev);
if (rc)
return ERR_PTR(rc);
of_property_read_u32(np, "tx-fifo-depth", &plat->tx_fifo_size);