]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
amd-xgbe: unwind on error in xgbe_mdio_register()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 11 Jun 2014 06:56:26 +0000 (09:56 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jun 2014 22:39:19 +0000 (15:39 -0700)
There is a typo here so we return directly instead of unwinding.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c

index 52bbdbf1a2cc7803b4b9fb35ea631e65a49de85a..ea7a5d6750eab054104a546584d3c3d487dafe07 100644 (file)
@@ -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",