aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_irq.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-10-17 14:03:53 -0400
committerDave Airlie <airlied@redhat.com>2008-10-22 23:42:27 -0400
commit35ad68c18148a18938ff4f40e945c9734e7d2265 (patch)
tree012e373dd3f252f5e6b015ca3eea461826f58b27 /drivers/gpu/drm/drm_irq.c
parent786225eb2f4e55b5dda3cf8c62a145e824aae199 (diff)
drm: Remove two leaks of vblank reference count in error paths.
If the failing paths were hit, the vblank IRQ would never get turned off again. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r--drivers/gpu/drm/drm_irq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 4091b9e291f9..212a94f715b2 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -594,11 +594,14 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
594 goto done; 594 goto done;
595 } 595 }
596 596
597 /* Get a refcount on the vblank, which will be released by
598 * drm_vbl_send_signals().
599 */
597 ret = drm_vblank_get(dev, crtc); 600 ret = drm_vblank_get(dev, crtc);
598 if (ret) { 601 if (ret) {
599 drm_free(vbl_sig, sizeof(struct drm_vbl_sig), 602 drm_free(vbl_sig, sizeof(struct drm_vbl_sig),
600 DRM_MEM_DRIVER); 603 DRM_MEM_DRIVER);
601 return ret; 604 goto done;
602 } 605 }
603 606
604 atomic_inc(&dev->vbl_signal_pending); 607 atomic_inc(&dev->vbl_signal_pending);