1
0
Fork 0

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@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
alistair/sensors
Dajun Jin 2020-03-02 20:24:21 -08:00 committed by David S. Miller
parent 116ca924ae
commit 209c65b61d
1 changed files with 1 additions and 0 deletions

View File

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