[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 2 Mar 2020 20:24:21 -0800
From: Dajun Jin <adajunjin@...il.com>
To: andrew@...n.ch, hkallweit1@...il.com, linux@...linux.org.uk,
robh+dt@...nel.org, frowand.list@...il.com
Cc: netdev@...r.kernel.org, devicetree@...r.kernel.org
Subject: [PATCH] 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@...il.com>
---
Hi Andrew, Thanks for your review.
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
Powered by blists - more mailing lists