Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <himal.prasad.ghimiray@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240820090230.3258128-2-himal.prasad.ghimiray@intel.com
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>

authored by

Himal Prasad Ghimiray and committed by
Nirmoy Das
19f01d4b 11b7309d

+2 -4
+2 -4
drivers/gpu/drm/xe/xe_sync.c
··· 249 249 { 250 250 if (sync->syncobj) 251 251 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); 256 254 if (sync->ufence) 257 255 user_fence_put(sync->ufence); 258 256 }