From: Dajun Jin Date: Tue, 3 Mar 2020 04:24:21 +0000 (-0800) Subject: drivers/of/of_mdio.c:fix of_mdiobus_register() X-Git-Tag: baikal/mips/sdk5.9~14142^2~52 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=054e388ef1df38ab4365ebc89accc00a6c3f9b3d;p=kernel.git 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 Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index 8270bbf505fbe..9f982c0627a0d 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; } } }