Skip to content

Commit

Permalink
net: stmmac: honor error code from stmmac_dt_phy()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Niklas Cassel authored and David S. Miller committed Feb 20, 2018
1 parent 2ee2132 commit ce339ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ce339ab

Please sign in to comment.