summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorDajun Jin <adajunjin@gmail.com>2020-03-02 20:24:21 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-02 16:34:27 +0200
commit06bd8b3078947d5d9ba9f0ccee8335a62f59b414 (patch)
tree68e00b02101fc97cd2ffb2dc803197ad52306988 /drivers/of
parent2c1f4d27781351a85333c267c9a06f41ba526921 (diff)
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>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/of_mdio.c1
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;
}
}
}