Skip to content

Commit 209c65b

Browse files
dajunjindavem330
authored andcommitted
drivers/of/of_mdio.c:fix of_mdiobus_register()
When registers a phy_device successful, should terminate the loop or the phy_device would be registered in other addr. If there are multiple PHYs without reg properties, it will go wrong. Signed-off-by: Dajun Jin <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 116ca92 commit 209c65b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/of/of_mdio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
306306
rc = of_mdiobus_register_phy(mdio, child, addr);
307307
if (rc && rc != -ENODEV)
308308
goto unregister;
309+
break;
309310
}
310311
}
311312
}

0 commit comments

Comments
 (0)