]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
phylib: phy_startup() should return an error code on failure
authorTimur Tabi <timur@freescale.com>
Thu, 5 Jul 2012 10:33:18 +0000 (10:33 +0000)
committerJoe Hershberger <joe.hershberger@ni.com>
Wed, 11 Jul 2012 18:15:30 +0000 (13:15 -0500)
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>
drivers/net/phy/phy.c

index 7d327f766a2cf23bbfd622de4f0b7e4bae8c4226..baef60f827466c8bf2d1227da0c850907774768c 100644 (file)
@@ -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;
 }