From: Himal Prasad Ghimiray Date: Tue, 20 Aug 2024 09:02:29 +0000 (+0530) Subject: drm/xe: Remove unrequired NULL checks in xe_sync_entry_cleanup X-Git-Tag: v6.12-rc1~126^2~15^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=19f01d4bbe9daf71901b200ab5c52591946b022a;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Matthew Brost Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240820090230.3258128-2-himal.prasad.ghimiray@intel.com Signed-off-by: Nirmoy Das --- diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c index a0675f57a3988..436faff09bac8 100644 --- a/drivers/gpu/drm/xe/xe_sync.c +++ b/drivers/gpu/drm/xe/xe_sync.c @@ -249,10 +249,8 @@ void xe_sync_entry_cleanup(struct xe_sync_entry *sync) { if (sync->syncobj) drm_syncobj_put(sync->syncobj); - if (sync->fence) - dma_fence_put(sync->fence); - if (sync->chain_fence) - dma_fence_chain_free(sync->chain_fence); + dma_fence_put(sync->fence); + dma_fence_chain_free(sync->chain_fence); if (sync->ufence) user_fence_put(sync->ufence); }