diff options
| author | Ben Skeggs <bskeggs@redhat.com> | 2014-01-22 19:49:47 -0500 |
|---|---|---|
| committer | Ben Skeggs <bskeggs@redhat.com> | 2014-01-22 22:39:19 -0500 |
| commit | 1139ffb96b3f4e8be9006552d2dd4d302d62c2ee (patch) | |
| tree | 7ee5b899a72c2ded6b00a77ba4a3de365a320daf /drivers/gpu | |
| parent | 2332b31116d5500d05173b2a7aaa95ba15d7983a (diff) | |
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.c | 4 |
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) | |||
| 74 | struct nouveau_display *disp = nouveau_display(dev); | 74 | struct nouveau_display *disp = nouveau_display(dev); |
| 75 | int i; | 75 | int i; |
| 76 | 76 | ||
| 77 | drm_vblank_cleanup(dev); | ||
| 78 | |||
| 77 | if (disp->vblank) { | 79 | if (disp->vblank) { |
| 78 | for (i = 0; i < dev->mode_config.num_crtc; i++) | 80 | for (i = 0; i < dev->mode_config.num_crtc; i++) |
| 79 | nouveau_event_ref(NULL, &disp->vblank[i]); | 81 | nouveau_event_ref(NULL, &disp->vblank[i]); |
| 80 | kfree(disp->vblank); | 82 | kfree(disp->vblank); |
| 81 | disp->vblank = NULL; | 83 | disp->vblank = NULL; |
| 82 | } | 84 | } |
| 83 | |||
| 84 | drm_vblank_cleanup(dev); | ||
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | static int | 87 | static int |
