summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-14 22:02:36 (GMT)
committerInki Dae <inki.dae@samsung.com>2014-10-15 11:05:17 (GMT)
commit24c3d5fa114fe5f44e8e4339b5ba8cf683f7645f (patch)
treec8e37ffaeec7f76efd2044018066d26af8dc6f40
parentf6d675ea9af22b13a1b7c9d83de7b81865ff8810 (diff)
downloadlinux-3.10-24c3d5fa114fe5f44e8e4339b5ba8cf683f7645f.zip
linux-3.10-24c3d5fa114fe5f44e8e4339b5ba8cf683f7645f.tar.gz
linux-3.10-24c3d5fa114fe5f44e8e4339b5ba8cf683f7645f.tar.bz2
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>
-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 21a6cbc..1c87f7e 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;
/*