summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_prime.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-15 00:02:38 +0200
committerDave Airlie <airlied@redhat.com>2013-08-21 12:53:46 +1000
commit730c4ff95eb54e5bab39357baddd0aa6da10d4fb (patch)
treecb97a2bbc7e35892c1d9183ad404c6e95690d465 /drivers/gpu/drm/drm_prime.c
parenta8e11d1c435f9d185c9f3b1981b9613a579b9999 (diff)
drm/prime: fix error path in drm_gem_prime_fd_to_handle
handle_unreference only clears up the obj->name and the reference, but would leave a dangling handle in the idr. The right thing to do is to call handle_delete. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_prime.c')
-rw-r--r--drivers/gpu/drm/drm_prime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
index f1159624c68e..82cd83e62e7d 100644
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -476,7 +476,7 @@ fail:
/* hmm, if driver attached, we are relying on the free-object path
* to detach.. which seems ok..
*/
- drm_gem_object_handle_unreference_unlocked(obj);
+ drm_gem_handle_delete(file_priv, *handle);
out_put:
dma_buf_put(dma_buf);
mutex_unlock(&file_priv->prime.lock);