From: Michal Simek Date: Wed, 18 May 2016 12:37:23 +0000 (+0200) Subject: phy: Wire return value from phy_config() X-Git-Tag: v2016.07-rc1~175^2~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7a673f0b0642fc542b464a91957bdd44179296b2;p=u-boot phy: Wire return value from phy_config() Fix zynq_gem driver to handle error from phy_config correctly. Signed-off-by: Michal Simek --- diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 98986bb6f1..4b6c09f88e 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -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) diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 3704ce0dd7..4d9c296c0b 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -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)