Destroy the /dev device before destroying the mutex or releasing resources
rather than afterwards. MFC after: 1 week
This commit is contained in:
parent
619a2b9cae
commit
91b174b0da
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user