Skip to content

Commit 19f01d4

Browse files
hghimiranirmoy
authored andcommitted
drm/xe: Remove unrequired NULL checks in xe_sync_entry_cleanup
dma_fence_put() and dma_fence_chain_free() can handle NULL input, there is no need for NULL check by caller. Signed-off-by: Himal Prasad Ghimiray <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Reviewed-by: Nirmoy Das <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Nirmoy Das <[email protected]>
1 parent 11b7309 commit 19f01d4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/gpu/drm/xe/xe_sync.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,8 @@ void xe_sync_entry_cleanup(struct xe_sync_entry *sync)
249249
{
250250
if (sync->syncobj)
251251
drm_syncobj_put(sync->syncobj);
252-
if (sync->fence)
253-
dma_fence_put(sync->fence);
254-
if (sync->chain_fence)
255-
dma_fence_chain_free(sync->chain_fence);
252+
dma_fence_put(sync->fence);
253+
dma_fence_chain_free(sync->chain_fence);
256254
if (sync->ufence)
257255
user_fence_put(sync->ufence);
258256
}

0 commit comments

Comments
 (0)