Skip to content

Commit

Permalink
drivers/of/of_mdio.c:fix of_mdiobus_register()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
dajunjin authored and davem330 committed Mar 4, 2020
1 parent 116ca92 commit 209c65b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/of/of_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
rc = of_mdiobus_register_phy(mdio, child, addr);
if (rc && rc != -ENODEV)
goto unregister;
break;
}
}
}
Expand Down

0 comments on commit 209c65b

Please sign in to comment.