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