summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-01-23 04:49:47 +0400
committerBen Skeggs <bskeggs@redhat.com>2014-01-23 07:39:19 +0400
commit1139ffb96b3f4e8be9006552d2dd4d302d62c2ee (patch)
tree7ee5b899a72c2ded6b00a77ba4a3de365a320daf /drivers/gpu
parent2332b31116d5500d05173b2a7aaa95ba15d7983a (diff)
downloadlinux-1139ffb96b3f4e8be9006552d2dd4d302d62c2ee.tar.xz
drm/nouveau: call drm_vblank_cleanup() earlier
Fixes a NULL-ptr deref seen on module unload sometimes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_display.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index a22d019bb217..b4262ad66b18 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -74,14 +74,14 @@ nouveau_display_vblank_fini(struct drm_device *dev)
struct nouveau_display *disp = nouveau_display(dev);
int i;
+ drm_vblank_cleanup(dev);
+
if (disp->vblank) {
for (i = 0; i < dev->mode_config.num_crtc; i++)
nouveau_event_ref(NULL, &disp->vblank[i]);
kfree(disp->vblank);
disp->vblank = NULL;
}
-
- drm_vblank_cleanup(dev);
}
static int