diff options
Diffstat (limited to 'drivers/net/ibm_emac')
-rw-r--r-- | drivers/net/ibm_emac/ibm_emac_phy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ibm_emac/ibm_emac_phy.c b/drivers/net/ibm_emac/ibm_emac_phy.c index 4a97024061e5..9074f76ee2bf 100644 --- a/drivers/net/ibm_emac/ibm_emac_phy.c +++ b/drivers/net/ibm_emac/ibm_emac_phy.c | |||
@@ -309,7 +309,7 @@ int mii_phy_probe(struct mii_phy *phy, int address) | |||
309 | { | 309 | { |
310 | struct mii_phy_def *def; | 310 | struct mii_phy_def *def; |
311 | int i; | 311 | int i; |
312 | u32 id; | 312 | int id; |
313 | 313 | ||
314 | phy->autoneg = AUTONEG_DISABLE; | 314 | phy->autoneg = AUTONEG_DISABLE; |
315 | phy->advertising = 0; | 315 | phy->advertising = 0; |
@@ -324,6 +324,8 @@ int mii_phy_probe(struct mii_phy *phy, int address) | |||
324 | 324 | ||
325 | /* Read ID and find matching entry */ | 325 | /* Read ID and find matching entry */ |
326 | id = (phy_read(phy, MII_PHYSID1) << 16) | phy_read(phy, MII_PHYSID2); | 326 | id = (phy_read(phy, MII_PHYSID1) << 16) | phy_read(phy, MII_PHYSID2); |
327 | if (id < 0) | ||
328 | return -ENODEV; | ||
327 | for (i = 0; (def = mii_phy_table[i]) != NULL; i++) | 329 | for (i = 0; (def = mii_phy_table[i]) != NULL; i++) |
328 | if ((id & def->phy_id_mask) == def->phy_id) | 330 | if ((id & def->phy_id_mask) == def->phy_id) |
329 | break; | 331 | break; |