The patch
8fba9cde9b815209e8f8fcd2587c85860b17ad06
hold reference to fence when creating sync_file.
After fence_init and create sync_file, fence reference
has increased twice, so we send the release fence after
decreasing the reference because the user receiving
the release fence expects the fence to increase once.
Change-Id: I3091c685790ac9f05284a8c4786a6f9312a8f674
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
atomic_inc_return(&g2d_dev->fence_timeline));
file = sync_file_create(fence);
- if (!file) {
- dma_fence_put(fence);
+ dma_fence_put(fence);
+ if (!file)
return ERR_PTR(-ENOMEM);
- }
for (i = 0; i < data->num_release_fences; i++) {
release_fences[i] = get_unused_fd_flags(O_CLOEXEC);