MFC: Destroy the /dev device before destroying the mutex or
releasing resources.
This commit is contained in:
parent
c8892dd722
commit
01364d3f00
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user