diff options
author | Timur Tabi <timur@freescale.com> | 2012-07-05 10:33:18 +0000 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2012-07-11 13:15:30 -0500 |
commit | 6e5b9ac097689e96d53f638842823fb1d1bf4223 (patch) | |
tree | 4c1fa76993469c8caf910d8564e2469cba60d210 /drivers/net | |
parent | bc46dfac2f21756642e549b05689e03db538639f (diff) | |
download | u-boot-imx-6e5b9ac097689e96d53f638842823fb1d1bf4223.zip u-boot-imx-6e5b9ac097689e96d53f638842823fb1d1bf4223.tar.gz u-boot-imx-6e5b9ac097689e96d53f638842823fb1d1bf4223.tar.bz2 |
phylib: phy_startup() should return an error code on failure
phy_startup() calls the PHY driver's startup function, but it ignores the
return code from that function, and so it never returns any failures.
Signed-off-by: Timur Tabi <timur@freescale.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/phy/phy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 7d327f7..baef60f 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -723,10 +723,13 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr, return phydev; } +/* + * Start the PHY. Returns 0 on success, or a negative error code. + */ int phy_startup(struct phy_device *phydev) { if (phydev->drv->startup) - phydev->drv->startup(phydev); + return phydev->drv->startup(phydev); return 0; } |