9
0
Fork 0

net: fec_imx: check return value of registration functions

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@pengutronix.de>
This commit is contained in:
Sascha Hauer 2014-05-20 11:10:21 +02:00
parent d4f202f30e
commit d4d9fc125f
1 changed files with 7 additions and 2 deletions

View File

@ -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: