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:
parent
d4f202f30e
commit
d4d9fc125f
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue