diff options
| author | Warner Losh <imp@FreeBSD.org> | 2005-09-19 03:10:21 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2005-09-19 03:10:21 +0000 |
| commit | ad4f426ef63acf8f93962c281274c677a055e500 (patch) | |
| tree | c3358cebc77043ea8b2a3a5036b02dad6a674b7e /sys/dev/nve | |
| parent | 6763e7c1edc7198eca8ab7017018b03f5c41e012 (diff) | |
Notes
Diffstat (limited to 'sys/dev/nve')
| -rw-r--r-- | sys/dev/nve/if_nve.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/nve/if_nve.c b/sys/dev/nve/if_nve.c index 0d8267a9b154..6ffecbd01d79 100644 --- a/sys/dev/nve/if_nve.c +++ b/sys/dev/nve/if_nve.c @@ -559,12 +559,10 @@ nve_detach(device_t dev) if (device_is_attached(dev)) { nve_stop(sc); + /* XXX shouldn't hold lock over call to ether_ifdetch */ ether_ifdetach(ifp); } - if (ifp) - if_free(ifp); - if (sc->miibus) device_delete_child(dev, sc->miibus); bus_generic_detach(dev); @@ -601,6 +599,8 @@ nve_detach(device_t dev) bus_dma_tag_destroy(sc->rtag); NVE_UNLOCK(sc); + if (ifp) + if_free(ifp); mtx_destroy(&sc->mtx); mtx_destroy(&sc->osmtx); |
