diff options
author | Dajun Jin <adajunjin@gmail.com> | 2020-03-02 20:24:21 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-03 19:01:51 -0800 |
commit | 209c65b61d94344522c41a83cd6ce51aac5fd0a4 (patch) | |
tree | d9ee62428ec1dd6d4a075704640601e7e6826834 | |
parent | 116ca924aea664141afa86a1425edc3fcda0d06f (diff) |
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 <adajunjin@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/of/of_mdio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index 8270bbf505fb..9f982c0627a0 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -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; } } } |