diff options
author | Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> | 2024-08-20 14:32:29 +0530 |
---|---|---|
committer | Nirmoy Das <nirmoy.das@intel.com> | 2024-08-27 10:32:57 +0200 |
commit | 19f01d4bbe9daf71901b200ab5c52591946b022a (patch) | |
tree | d19ad99a348c4e7299e059bab179877dfaa78725 /drivers/gpu/drm/xe/xe_sync.c | |
parent | 11b7309dbe9fa98d9b8d18cd51db4f385c37ae30 (diff) | |
download | lwn-19f01d4bbe9daf71901b200ab5c52591946b022a.tar.gz lwn-19f01d4bbe9daf71901b200ab5c52591946b022a.zip |
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>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_sync.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_sync.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c index a0675f57a398..436faff09bac 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); } |