When msk_detach() is called from msk_attach(), ifp may be

yet not initialized.
This commit is contained in:
Gleb Smirnoff 2011-04-25 04:55:50 +00:00
parent c2442d279a
commit 4c5a247b54

View File

@ -1964,7 +1964,8 @@ msk_detach(device_t dev)
/* Can't hold locks while calling detach. */
MSK_IF_UNLOCK(sc_if);
callout_drain(&sc_if->msk_tick_ch);
ether_ifdetach(ifp);
if (ifp)
ether_ifdetach(ifp);
MSK_IF_LOCK(sc_if);
}