summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2013-04-24 19:04:57 +0300
committerDave Airlie <airlied@redhat.com>2013-05-01 16:08:18 +1000
commit98b76231d7ef49c71c7fea354f00c619ab2c1be4 (patch)
tree0fd0a1fe3a178c58181b5b1f848ceb4f933f11ad /drivers/gpu
parent33896bf3207d8812274747b8b96776d27082e580 (diff)
downloadlinux-3.10-98b76231d7ef49c71c7fea354f00c619ab2c1be4.tar.gz
linux-3.10-98b76231d7ef49c71c7fea354f00c619ab2c1be4.tar.bz2
linux-3.10-98b76231d7ef49c71c7fea354f00c619ab2c1be4.zip
drm/prime: warn for non-empty handle lookup list during drm file release
drm_gem_release should release all handles connected to the drm file and so should also release the prime lookup entries of these handles. So just WARN if this isn't the case. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_prime.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
index 71c7315ca00..dcde35231e2 100644
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -488,11 +488,8 @@ EXPORT_SYMBOL(drm_prime_init_file_private);
void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv)
{
- struct drm_prime_member *member, *safe;
- list_for_each_entry_safe(member, safe, &prime_fpriv->head, entry) {
- list_del(&member->entry);
- kfree(member);
- }
+ /* by now drm_gem_release should've made sure the list is empty */
+ WARN_ON(!list_empty(&prime_fpriv->head));
}
EXPORT_SYMBOL(drm_prime_destroy_file_private);