From 679f3f62a88921f231c08a8489cf2aec9168842c Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sun, 1 Mar 2015 21:41:33 +0000 Subject: [PATCH] Unlock the main lock before returning rather than after to eliminate dead code that shouldn't have been dead. Reported by: Maxime Villard --- sys/dev/ed/if_ed_pccard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ed/if_ed_pccard.c b/sys/dev/ed/if_ed_pccard.c index 49875c6fe29b..505aff681ac8 100644 --- a/sys/dev/ed/if_ed_pccard.c +++ b/sys/dev/ed/if_ed_pccard.c @@ -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);