summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-15 00:02:36 +0200
committerChanho Park <chanho61.park@samsung.com>2014-11-21 19:13:42 +0900
commitad88c30ff4a1eb62f23dd5b5ff99f3ac576ae20e (patch)
tree7d9fc49c754cf987917c6461fb42a64511465f3f /drivers/gpu/drm
parent50f6fafe2ae9f0b56e848f72a333d13bc1a21f11 (diff)
downloadlinux-3.10-ad88c30ff4a1eb62f23dd5b5ff99f3ac576ae20e.tar.gz
linux-3.10-ad88c30ff4a1eb62f23dd5b5ff99f3ac576ae20e.tar.bz2
linux-3.10-ad88c30ff4a1eb62f23dd5b5ff99f3ac576ae20e.zip
drm/gem: WARN about unbalanced handle refcounts
Trying to drop a reference we don't have is a pretty serious bug. Trying to paper over it is an even worse offense. So scream into dmesg with a big WARN in case that ever happens. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/drm_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 21a6cbce8e0..1c87f7e0664 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -301,7 +301,7 @@ static void drm_gem_object_handle_free(struct drm_gem_object *obj)
void
drm_gem_object_handle_unreference_unlocked(struct drm_gem_object *obj)
{
- if (atomic_read(&obj->handle_count) == 0)
+ if (WARN_ON(atomic_read(&obj->handle_count) == 0))
return;
/*