]> git.sur5r.net Git - u-boot/commitdiff
phy: Wire return value from phy_config()
authorMichal Simek <michal.simek@xilinx.com>
Wed, 18 May 2016 12:37:23 +0000 (14:37 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 24 May 2016 11:17:59 +0000 (13:17 +0200)
Fix zynq_gem driver to handle error from phy_config correctly.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/net/phy/phy.c
drivers/net/zynq_gem.c

index 98986bb6f13f0660685c9ec6b89d02d865f9b505..4b6c09f88ec08bebb53547b4f45a0b37ef08895b 100644 (file)
@@ -879,9 +879,7 @@ __weak int board_phy_config(struct phy_device *phydev)
 int phy_config(struct phy_device *phydev)
 {
        /* Invoke an optional board-specific helper */
-       board_phy_config(phydev);
-
-       return 0;
+       return board_phy_config(phydev);
 }
 
 int phy_shutdown(struct phy_device *phydev)
index 3704ce0dd78a58553c7b395fa909322d7957fbea..4d9c296c0ba9019451c4236ac5000c2f54ba06c5 100644 (file)
@@ -352,9 +352,8 @@ static int zynq_phy_init(struct udevice *dev)
        priv->phydev->supported = supported | ADVERTISED_Pause |
                                  ADVERTISED_Asym_Pause;
        priv->phydev->advertising = priv->phydev->supported;
-       phy_config(priv->phydev);
 
-       return 0;
+       return phy_config(priv->phydev);
 }
 
 static int zynq_gem_init(struct udevice *dev)