Skip to content

Commit 21d139d

Browse files
dma-buf/sync-file: fix logic error in new fence merge code
When the array is empty because everything is signaled we can't use add_fence() to add something because that would filter the signaled fence again. Signed-off-by: Christian König <christian.koenig@amd.com> Fixes: 519f490 ("dma-buf/sync-file: fix warning about fence containers") Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220329070001.134180-1-christian.koenig@amd.com
1 parent 519f490 commit 21d139d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/dma-buf/sync_file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
262262
}
263263

264264
if (index == 0)
265-
add_fence(fences, &index, dma_fence_get_stub());
265+
fences[index++] = dma_fence_get_stub();
266266

267267
if (num_fences > index) {
268268
struct dma_fence **tmp;

0 commit comments

Comments
 (0)