diff options
author | Christian König <christian.koenig@amd.com> | 2022-03-29 08:45:04 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2022-03-29 09:14:10 +0200 |
commit | 21d139d73f776aed1e86f3175a1e9fb8a10930c7 (patch) | |
tree | 6ca7bf5fa655de78b8c81165af716b9104d8004d | |
parent | 519f490db07e1a539490612f376487f61e48e39c (diff) | |
download | linux-21d139d73f776aed1e86f3175a1e9fb8a10930c7.tar.bz2 |
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: 519f490db07e ("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
-rw-r--r-- | drivers/dma-buf/sync_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c index b8dea4ec123b..514d213261df 100644 --- a/drivers/dma-buf/sync_file.c +++ b/drivers/dma-buf/sync_file.c @@ -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; |