From 8fc908c3c3a362df1bf9b8f999d30e2c4258d3fc Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 11 Jun 2014 09:56:26 +0300 Subject: [PATCH] amd-xgbe: unwind on error in xgbe_mdio_register() There is a typo here so we return directly instead of unwinding. Signed-off-by: Dan Carpenter Acked-by: Tom Lendacky Signed-off-by: David S. Miller --- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c index 52bbdbf1a2cc..ea7a5d6750ea 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c @@ -367,7 +367,7 @@ int xgbe_mdio_register(struct xgbe_prv_data *pdata) if (!phydev->drv || (phydev->drv->phy_id == 0)) { netdev_err(netdev, "phy_id not valid\n"); - return -ENODEV; + ret = -ENODEV; goto err_phy_connect; } DBGPR(" phy_connect_direct succeeded for PHY %s, link=%d\n", -- 2.30.2