3.16.49-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Rob Clark <robdclark@xxxxxxxxx> commit 7f907bf284ba7bb8d271f094b226699d3fef2142 upstream. Let's make things a bit easier to debug when things go bad (potentially under console_lock). Signed-off-by: Rob Clark <robdclark@xxxxxxxxx> Reviewed-by: Michel Dänzer <michel.daenzer@xxxxxxx> Signed-off-by: Dave Airlie <airlied@xxxxxxxxxx> [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx> --- drivers/gpu/drm/drm_irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -973,7 +973,8 @@ EXPORT_SYMBOL(drm_crtc_vblank_get); */ void drm_vblank_put(struct drm_device *dev, int crtc) { - BUG_ON(atomic_read(&dev->vblank[crtc].refcount) == 0); + if (WARN_ON(atomic_read(&dev->vblank[crtc].refcount) == 0)) + return; /* Last user schedules interrupt disable */ if (atomic_dec_and_test(&dev->vblank[crtc].refcount) &&