netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/of/of_mdio.c:fix of_mdiobus_register()
@ 2020-03-01 16:41 Dajun Jin
  2020-03-01 16:50 ` Andrew Lunn
  0 siblings, 1 reply; 8+ messages in thread
From: Dajun Jin @ 2020-03-01 16:41 UTC (permalink / raw)
  To: andrew, hkallweit1, linux, robh+dt, frowand.list
  Cc: netdev, devicetree, Dajun Jin

when registers a phy_device successful, should terminate the loop
or the phy_device would be registered in other addr.

Signed-off-by: Dajun Jin <adajunjin@gmail.com>
---
 drivers/of/of_mdio.c | 1 +
 1 file changed, 1 insertion(+)

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;
 			}
 		}
 	}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-03-04  3:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-01 16:41 [PATCH] drivers/of/of_mdio.c:fix of_mdiobus_register() Dajun Jin
2020-03-01 16:50 ` Andrew Lunn
2020-03-02 17:29   ` Dajun Jin
2020-03-02 17:57     ` Andrew Lunn
2020-03-02 18:38       ` Russell King - ARM Linux admin
2020-03-03  4:24       ` Dajun Jin
2020-03-03 22:02         ` Andrew Lunn
2020-03-04  3:02         ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).