drm/prime: fix to put an exported dma_buf for adding handle failure
authorYoungJun Cho <yj44.cho@samsung.com>
Wed, 26 Jun 2013 01:21:40 +0000 (10:21 +0900)
committerChanho Park <chanho61.park@samsung.com>
Fri, 21 Nov 2014 10:12:23 +0000 (19:12 +0900)
commitb2ddf4610f5c39025bcbc8ef1be2e0785eb8e53d
tree3505c1611566a24e59716a96627c4ed443072639
parentca3561faf31ab329074eb795f2f7c8a2a19ae430
drm/prime: fix to put an exported dma_buf for adding handle failure

When drm_prime_add_buf_handle() returns failure for an exported
dma_buf, the dma_buf was already allocated and its refcount was
increased, so it needs to be put.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_prime.c