phy: mdiobus_register(): initialize all phy_map entries

make sure phy_map entries whose PHY address is masked are initialized
to NULL, given that other code (such as mdiobus_unregister for
instance) assumes that non-NULL phy_map entries are allocated
phy_devices

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

authored by Herbert Valerio Riedel and committed by Stephen Hemminger 64b1c2b4 f4ea431b

+3 -1
+3 -1
drivers/net/phy/mdio_bus.c
··· 60 60 for (i = 0; i < PHY_MAX_ADDR; i++) { 61 61 struct phy_device *phydev; 62 62 63 - if (bus->phy_mask & (1 << i)) 63 + if (bus->phy_mask & (1 << i)) { 64 + bus->phy_map[i] = NULL; 64 65 continue; 66 + } 65 67 66 68 phydev = get_phy_device(bus, i); 67 69