From: Alvin Šipraga <alsi@xxxxxxxxxxxxxxx> This is necessary so that on systems with MDIO-connected Etheret switches, DSA can find the master edev during switch registration. Otherwise the switch setup will fail. Signed-off-by: Alvin Šipraga <alsi@xxxxxxxxxxxxxxx> --- drivers/net/fec_imx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c index 203a2a8aa191..75a65962820b 100644 --- a/drivers/net/fec_imx.c +++ b/drivers/net/fec_imx.c @@ -895,18 +895,18 @@ static int fec_probe(struct device *dev) fec->miibus.priv = fec; fec->miibus.parent = dev; - ret = mdiobus_register(&fec->miibus); + ret = eth_register(edev); if (ret) goto free_receive_packets; - ret = eth_register(edev); + ret = mdiobus_register(&fec->miibus); if (ret) - goto unregister_mdio; + goto unregister_eth; return 0; -unregister_mdio: - mdiobus_unregister(&fec->miibus); +unregister_eth: + eth_unregister(edev); free_receive_packets: fec_free_receive_packets(fec, FEC_RBD_NUM, FEC_MAX_PKT_SIZE); free_xbd: -- 2.43.0