diff options
author | jhb <jhb@FreeBSD.org> | 2005-12-20 20:03:16 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-12-20 20:03:16 +0000 |
commit | 91b174b0da95c762353dbba849743ffef9db133a (patch) | |
tree | 3bf15a6bdca67532dc9b0e447b570c3ce3ff0c35 /sys/pci/agp.c | |
parent | 619a2b9cae3992904087b1de756bddd04ae64e50 (diff) | |
download | FreeBSD-src-91b174b0da95c762353dbba849743ffef9db133a.zip FreeBSD-src-91b174b0da95c762353dbba849743ffef9db133a.tar.gz |
Destroy the /dev device before destroying the mutex or releasing resources
rather than afterwards.
MFC after: 1 week
Diffstat (limited to 'sys/pci/agp.c')
-rw-r--r-- | sys/pci/agp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/pci/agp.c b/sys/pci/agp.c index d074f18..b44cfc9 100644 --- a/sys/pci/agp.c +++ b/sys/pci/agp.c @@ -253,9 +253,10 @@ int agp_generic_detach(device_t dev) { struct agp_softc *sc = device_get_softc(dev); + + destroy_dev(sc->as_devnode); bus_release_resource(dev, SYS_RES_MEMORY, AGP_APBASE, sc->as_aperture); mtx_destroy(&sc->as_lock); - destroy_dev(sc->as_devnode); agp_flush_cache(); return 0; } |