aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cris/eth_v10.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/cris/eth_v10.c')
-rw-r--r--drivers/net/cris/eth_v10.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c
index 26ffa810e581..5dc984a3e005 100644
--- a/drivers/net/cris/eth_v10.c
+++ b/drivers/net/cris/eth_v10.c
@@ -1088,6 +1088,8 @@ e100_set_duplex(struct net_device* dev, enum duplex new_duplex)
1088static int 1088static int
1089e100_probe_transceiver(struct net_device* dev) 1089e100_probe_transceiver(struct net_device* dev)
1090{ 1090{
1091 int ret = 0;
1092
1091#if !defined(CONFIG_ETRAX_NO_PHY) 1093#if !defined(CONFIG_ETRAX_NO_PHY)
1092 unsigned int phyid_high; 1094 unsigned int phyid_high;
1093 unsigned int phyid_low; 1095 unsigned int phyid_low;
@@ -1104,8 +1106,10 @@ e100_probe_transceiver(struct net_device* dev)
1104 np->mii_if.phy_id, MII_BMSR) != 0xffff) 1106 np->mii_if.phy_id, MII_BMSR) != 0xffff)
1105 break; 1107 break;
1106 } 1108 }
1107 if (np->mii_if.phy_id == 32) 1109 if (np->mii_if.phy_id == 32) {
1108 return -ENODEV; 1110 ret = -ENODEV;
1111 goto out;
1112 }
1109 1113
1110 /* Get manufacturer */ 1114 /* Get manufacturer */
1111 phyid_high = e100_get_mdio_reg(dev, np->mii_if.phy_id, MII_PHYSID1); 1115 phyid_high = e100_get_mdio_reg(dev, np->mii_if.phy_id, MII_PHYSID1);
@@ -1117,10 +1121,10 @@ e100_probe_transceiver(struct net_device* dev)
1117 break; 1121 break;
1118 } 1122 }
1119 transceiver = ops; 1123 transceiver = ops;
1120 1124out:
1121 spin_unlock(&np->transceiver_lock); 1125 spin_unlock(&np->transceiver_lock);
1122#endif 1126#endif
1123 return 0; 1127 return ret;
1124} 1128}
1125 1129
1126static int 1130static int