Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349737
b: refs/heads/master
c: 3955b22
h: refs/heads/master
i:
  349735: 1f7befb
v: v3
  • Loading branch information
Giuseppe CAVALLARO authored and David S. Miller committed Feb 11, 2013
1 parent 49a4b85 commit 3ed5202
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: de53d55798f44c6c95442ab839004b7272ab61dd
refs/heads/master: 3955b22b9798ae8694ac053614694695991f0a91
10 changes: 7 additions & 3 deletions trunk/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ int stmmac_mdio_register(struct net_device *ndev)
goto bus_register_fail;
}

priv->mii = new_bus;

found = 0;
for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
struct phy_device *phydev = new_bus->phy_map[addr];
Expand Down Expand Up @@ -237,8 +235,14 @@ int stmmac_mdio_register(struct net_device *ndev)
}
}

if (!found)
if (!found) {
pr_warning("%s: No PHY found\n", ndev->name);
mdiobus_unregister(new_bus);
mdiobus_free(new_bus);
return -ENODEV;
}

priv->mii = new_bus;

return 0;

Expand Down

0 comments on commit 3ed5202

Please sign in to comment.