Skip to content

Commit

Permalink
drm/nouveau: call drm_vblank_cleanup() earlier
Browse files Browse the repository at this point in the history
Fixes a NULL-ptr deref seen on module unload sometimes.

Signed-off-by: Ben Skeggs <[email protected]>
  • Loading branch information
Ben Skeggs committed Jan 23, 2014
1 parent 2332b31 commit 1139ffb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/nouveau/nouveau_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1139ffb

Please sign in to comment.