mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
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: 519f490db0
("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
This commit is contained in:
parent
519f490db0
commit
21d139d73f
@ -262,7 +262,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
|
||||
}
|
||||
|
||||
if (index == 0)
|
||||
add_fence(fences, &index, dma_fence_get_stub());
|
||||
fences[index++] = dma_fence_get_stub();
|
||||
|
||||
if (num_fences > index) {
|
||||
struct dma_fence **tmp;
|
||||
|
Loading…
Reference in New Issue
Block a user