drm/xe/vm: Do not dma_fence_put zero fences in err_out path

It is not necessary to iterate over and dma_fence_put current_fence
fences in the err_out path of ops_execute because current_fences cannot
be non-zero when jumping to that section of code.

Caught by static analysis.

Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: Shuicheng Lin <shuicheng.lin@intel.com>
Cc: Maarten Lankhorst <dev@lankhorst.se>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260929205606.1076177-1-jonathan.cavitt@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
Jonathan Cavitt 2026-09-30 04:56:06 +08:00 committed by Rodrigo Vivi
parent 965f624349
commit 23930d5018
No known key found for this signature in database
GPG Key ID: FA625F640EEB13CA

View File

@ -3575,8 +3575,6 @@ static struct dma_fence *ops_execute(struct xe_vm *vm,
err_out:
xe_pt_update_ops_abort(xe, vops);
while (current_fence)
dma_fence_put(fences[--current_fence]);
kfree(fences);
kfree(cf);