summaryrefslogtreecommitdiffstats
path: root/sys/dev/sf
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-10-13 21:11:20 +0000
committerru <ru@FreeBSD.org>2005-10-13 21:11:20 +0000
commitb9c7add838ccaace56cbb1d065e502e478f92d4e (patch)
tree42d971c6d541bfdfd3204acba1a4ae6004c37124 /sys/dev/sf
parent9d4f7296d4bd26d172e55a582c41d028d6dceb40 (diff)
downloadFreeBSD-src-b9c7add838ccaace56cbb1d065e502e478f92d4e.zip
FreeBSD-src-b9c7add838ccaace56cbb1d065e502e478f92d4e.tar.gz
In detach method, move if_free() after bus_teardown_intr().
Diffstat (limited to 'sys/dev/sf')
-rw-r--r--sys/dev/sf/if_sf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c
index 7b2538b..d51641d 100644
--- a/sys/dev/sf/if_sf.c
+++ b/sys/dev/sf/if_sf.c
@@ -830,8 +830,6 @@ sf_detach(dev)
callout_drain(&sc->sf_stat_callout);
ether_ifdetach(ifp);
}
- if (ifp)
- if_free(ifp);
if (sc->sf_miibus)
device_delete_child(dev, sc->sf_miibus);
bus_generic_detach(dev);
@@ -843,6 +841,9 @@ sf_detach(dev)
if (sc->sf_res)
bus_release_resource(dev, SF_RES, SF_RID, sc->sf_res);
+ if (ifp)
+ if_free(ifp);
+
if (sc->sf_ldata)
contigfree(sc->sf_ldata, sizeof(struct sf_list_data), M_DEVBUF);
OpenPOWER on IntegriCloud