diff options
author | Dajun Jin <adajunjin@gmail.com> | 2020-03-03 07:24:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-02 17:34:27 +0300 |
commit | 06bd8b3078947d5d9ba9f0ccee8335a62f59b414 (patch) | |
tree | 68e00b02101fc97cd2ffb2dc803197ad52306988 | |
parent | 2c1f4d27781351a85333c267c9a06f41ba526921 (diff) | |
download | linux-06bd8b3078947d5d9ba9f0ccee8335a62f59b414.tar.xz |
drivers/of/of_mdio.c:fix of_mdiobus_register()
[ Upstream commit 209c65b61d94344522c41a83cd6ce51aac5fd0a4 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 fe26697d3bd7..69da2f6896da 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -259,6 +259,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; } } } |