diff options
author | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2016-10-26 16:59:59 -0400 |
---|---|---|
committer | Sumit Semwal <sumit.semwal@linaro.org> | 2016-11-08 13:27:40 -0500 |
commit | 4592bfcd177fe78cf9adc59f2dcddd1fa1f71079 (patch) | |
tree | debef86ea903de548c5a69f99e0d3c0d5e81718c | |
parent | 748815881f7824b489d63a8cd8a4e27ef14c303b (diff) |
dma-buf/sw_sync: put fence reference from the fence creation
Once sw_sync_ioctl_create_fence() returns we no longer have the
*pt pointer to the fence base object thus we need to put the reference
we have from the fence creation to keep a correct reference accounting.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1477515599-7685-1-git-send-email-gustavo@padovan.org
-rw-r--r-- | drivers/dma-buf/sw_sync.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma-buf/sw_sync.c b/drivers/dma-buf/sw_sync.c index 7aa4d7b1ba50..69c5ff36e2f9 100644 --- a/drivers/dma-buf/sw_sync.c +++ b/drivers/dma-buf/sw_sync.c | |||
@@ -316,8 +316,8 @@ static long sw_sync_ioctl_create_fence(struct sync_timeline *obj, | |||
316 | } | 316 | } |
317 | 317 | ||
318 | sync_file = sync_file_create(&pt->base); | 318 | sync_file = sync_file_create(&pt->base); |
319 | dma_fence_put(&pt->base); | ||
319 | if (!sync_file) { | 320 | if (!sync_file) { |
320 | dma_fence_put(&pt->base); | ||
321 | err = -ENOMEM; | 321 | err = -ENOMEM; |
322 | goto err; | 322 | goto err; |
323 | } | 323 | } |