Unlock the main lock before returning rather than after to eliminate

dead code that shouldn't have been dead.

Reported by: Maxime Villard
This commit is contained in:
Warner Losh 2015-03-01 21:41:33 +00:00
parent 3846dae834
commit 679f3f62a8

View File

@ -1172,8 +1172,8 @@ ed_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
sc = ifp->if_softc;
ED_LOCK(sc);
if (sc->miibus == NULL) {
return;
ED_UNLOCK(sc);
return;
}
mii = device_get_softc(sc->miibus);