Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> --- drivers/net/fec_imx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c index 465dcf9..83fdec6 100644 --- a/drivers/net/fec_imx.c +++ b/drivers/net/fec_imx.c @@ -767,14 +767,16 @@ static int fec_probe(struct device_d *dev) ret = mdiobus_register(&fec->miibus); if (ret) - return ret; + goto free_receive_packets; ret = eth_register(edev); if (ret) - return ret; + goto unregister_mdio; return 0; +unregister_mdio: + mdiobus_unregister(&fec->miibus); free_receive_packets: fec_free_receive_packets(fec, FEC_RBD_NUM, FEC_MAX_PKT_SIZE); free_xbd: -- 2.5.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox