diff options
-rw-r--r-- | sys/dev/e1000/if_em.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index e245a95..5c1f300 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -710,6 +710,9 @@ em_detach(device_t dev) ether_poll_deregister(ifp); #endif + if (adapter->led_dev != NULL) + led_destroy(adapter->led_dev); + EM_CORE_LOCK(adapter); adapter->in_detach = 1; em_stop(adapter); @@ -779,9 +782,6 @@ em_resume(device_t dev) struct adapter *adapter = device_get_softc(dev); struct ifnet *ifp = adapter->ifp; - if (adapter->led_dev != NULL) - led_destroy(adapter->led_dev); - EM_CORE_LOCK(adapter); em_init_locked(adapter); em_init_manageability(adapter); |