MFC: Destroy the /dev device before destroying the mutex or

releasing resources.
This commit is contained in:
jhb 2005-12-28 16:52:45 +00:00
parent c8892dd722
commit 01364d3f00

View File

@ -274,9 +274,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;
}