diff options
author | ru <ru@FreeBSD.org> | 2005-10-13 21:11:20 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2005-10-13 21:11:20 +0000 |
commit | b9c7add838ccaace56cbb1d065e502e478f92d4e (patch) | |
tree | 42d971c6d541bfdfd3204acba1a4ae6004c37124 /sys/pci/if_dc.c | |
parent | 9d4f7296d4bd26d172e55a582c41d028d6dceb40 (diff) | |
download | FreeBSD-src-b9c7add838ccaace56cbb1d065e502e478f92d4e.zip FreeBSD-src-b9c7add838ccaace56cbb1d065e502e478f92d4e.tar.gz |
In detach method, move if_free() after bus_teardown_intr().
Diffstat (limited to 'sys/pci/if_dc.c')
-rw-r--r-- | sys/pci/if_dc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c index d4322d5..caaa7e6 100644 --- a/sys/pci/if_dc.c +++ b/sys/pci/if_dc.c @@ -2356,8 +2356,6 @@ dc_detach(device_t dev) callout_drain(&sc->dc_stat_ch); ether_ifdetach(ifp); } - if (ifp) - if_free(ifp); if (sc->dc_miibus) device_delete_child(dev, sc->dc_miibus); bus_generic_detach(dev); @@ -2369,6 +2367,9 @@ dc_detach(device_t dev) if (sc->dc_res) bus_release_resource(dev, DC_RES, DC_RID, sc->dc_res); + if (ifp) + if_free(ifp); + if (sc->dc_cdata.dc_sbuf != NULL) bus_dmamem_free(sc->dc_stag, sc->dc_cdata.dc_sbuf, sc->dc_smap); if (sc->dc_ldata != NULL) |