We do not care about releasing the resources in the error path, but at least check the return value of eth_register and mdiobus_register. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- drivers/net/fec_imx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c index 714f8f2..808bf8f 100644 --- a/drivers/net/fec_imx.c +++ b/drivers/net/fec_imx.c @@ -732,9 +732,14 @@ static int fec_probe(struct device_d *dev) fec->miibus.priv = fec; fec->miibus.parent = dev; - mdiobus_register(&fec->miibus); + ret = mdiobus_register(&fec->miibus); + if (ret) + return ret; + + ret = eth_register(edev); + if (ret) + return ret; - eth_register(edev); return 0; err_free: -- 2.0.0.rc0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox