mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-27 20:55:28 +08:00
dpaa: No error if MII attach failed
This commit is contained in:
parent
9da83e7886
commit
03d142659f
@ -451,11 +451,10 @@ fman_mac_dev_attach(device_t dev)
|
|||||||
error = mii_attach(dev, &sc->miibus, ifp,
|
error = mii_attach(dev, &sc->miibus, ifp,
|
||||||
fman_mac_media_change, fman_mac_media_status,
|
fman_mac_media_change, fman_mac_media_status,
|
||||||
BMSR_DEFCAPMASK, phy_dev->mdio.addr, MII_OFFSET_ANY, 0);
|
BMSR_DEFCAPMASK, phy_dev->mdio.addr, MII_OFFSET_ANY, 0);
|
||||||
if (error != 0) {
|
if (error == 0) {
|
||||||
goto error_2;
|
|
||||||
}
|
|
||||||
sc->mii_softc = device_get_softc(sc->miibus);
|
sc->mii_softc = device_get_softc(sc->miibus);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sc->mac_dev.net_dev.ifp = ifp;
|
sc->mac_dev.net_dev.ifp = ifp;
|
||||||
|
|
||||||
@ -466,7 +465,6 @@ fman_mac_dev_attach(device_t dev)
|
|||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
error_2:
|
|
||||||
if_free(ifp);
|
if_free(ifp);
|
||||||
error_1:
|
error_1:
|
||||||
uma_zdestroy(sc->sgt_zone);
|
uma_zdestroy(sc->sgt_zone);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user