drm/irq: BUG_ON() -> WARN_ON()
authorRob Clark <robdclark@gmail.com>
Sat, 8 Nov 2014 15:16:19 +0000 (10:16 -0500)
committerDave Airlie <airlied@redhat.com>
Thu, 20 Nov 2014 01:33:51 +0000 (11:33 +1000)
Let's make things a bit easier to debug when things go bad (potentially
under console_lock).

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_irq.c

index 3e6b582f60dd1251e563bb232eb05c1d78f21488..0e47df4ef24efa2226de1f1fa8b4ea26c76e55cb 100644 (file)
@@ -1029,7 +1029,8 @@ void drm_vblank_put(struct drm_device *dev, int crtc)
 {
        struct drm_vblank_crtc *vblank = &dev->vblank[crtc];
 
-       BUG_ON(atomic_read(&vblank->refcount) == 0);
+       if (WARN_ON(atomic_read(&vblank->refcount) == 0))
+               return;
 
        if (WARN_ON(crtc >= dev->num_crtcs))
                return;