dma-buf/sync_file: cleanup fence merging a bit
authorChristian König <christian.koenig@amd.com>
Fri, 22 Apr 2022 12:38:47 +0000 (14:38 +0200)
committerChristian König <christian.koenig@amd.com>
Wed, 4 May 2022 10:09:53 +0000 (12:09 +0200)
commitf778f405faa2cda2342ac290b24c2c17c25d7c16
treed60c23a1bb607b2cff48af3cd2b2c9e1bf1a2625
parentd7442505de9259f8b975232470378d399c25b2fa
dma-buf/sync_file: cleanup fence merging a bit

krealloc_array() ignores attempts to reduce the array size, so the attempt
to save memory is completely pointless here.

Also move testing for the no fence case into sync_file_set_fence(), this
way we don't even touch the fence array when we don't have any fences.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220426124637.329764-1-christian.koenig@amd.com
drivers/dma-buf/sync_file.c