Commit 11b7309d authored by Himal Prasad Ghimiray's avatar Himal Prasad Ghimiray Committed by Nirmoy Das

drm/xe: Remove extra dma_fence_put on xe_sync_entry_add_deps failure

drm_sched_job_add_dependency() drops references even in case of error,
no need for caller to call dma_fence_put.
Signed-off-by: default avatarHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarAshutosh Dixit <ashutosh.dixit@intel.com>
Acked-by: default avatarNirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240820090230.3258128-1-himal.prasad.ghimiray@intel.comSigned-off-by: default avatarNirmoy Das <nirmoy.das@intel.com>
parent 9c57bc08
...@@ -206,16 +206,9 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef, ...@@ -206,16 +206,9 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
int xe_sync_entry_add_deps(struct xe_sync_entry *sync, struct xe_sched_job *job) int xe_sync_entry_add_deps(struct xe_sync_entry *sync, struct xe_sched_job *job)
{ {
int err; if (sync->fence)
return drm_sched_job_add_dependency(&job->drm,
if (sync->fence) { dma_fence_get(sync->fence));
err = drm_sched_job_add_dependency(&job->drm,
dma_fence_get(sync->fence));
if (err) {
dma_fence_put(sync->fence);
return err;
}
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment