diff options
author | Robert Noland <rnoland@2hip.net> | 2008-09-08 16:40:52 -0400 |
---|---|---|
committer | Robert Noland <rnoland@2hip.net> | 2008-09-08 16:40:52 -0400 |
commit | 828ae3f6b88b5a69a56b2961307e40ed95edea29 (patch) | |
tree | ddb85f8137f771d3c7048457d1c38bcbf0aeb772 /bsd-core/sis_drv.c | |
parent | 2880c86eb246aceeb5c750e27259a7b6d8897328 (diff) |
[FreeBSD] We need to call drm_detach before we free dev->driver.
The driver is in control of the show, so when you try and unload a module
the driver detach routine is called first. It is what drives the whole
unload process and so lots of panics occur if dev->driver is already
free.
Diffstat (limited to 'bsd-core/sis_drv.c')
-rw-r--r-- | bsd-core/sis_drv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bsd-core/sis_drv.c b/bsd-core/sis_drv.c index 8ad6414d..bcf4ffd6 100644 --- a/bsd-core/sis_drv.c +++ b/bsd-core/sis_drv.c @@ -80,10 +80,13 @@ static int sis_detach(device_t nbdev) { struct drm_device *dev = device_get_softc(nbdev); + int ret; + + ret = drm_detach(nbdev); free(dev->driver, M_DRM); - return drm_detach(nbdev); + return ret; } static device_method_t sis_methods[] = { |