Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/xe: Remove extra dma_fence_put on xe_sync_entry_add_deps failure
@ 2024-08-20  9:02 Himal Prasad Ghimiray
  2024-08-20  8:55 ` ✓ CI.Patch_applied: success for series starting with [1/3] " Patchwork
                   ` (12 more replies)
  0 siblings, 13 replies; 20+ messages in thread
From: Himal Prasad Ghimiray @ 2024-08-20  9:02 UTC (permalink / raw)
  To: intel-xe; +Cc: Himal Prasad Ghimiray

drm_sched_job_add_dependency() drops references even in case of error,
no need for caller to call dma_fence_put.

Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
 drivers/gpu/drm/xe/xe_sync.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
index ca826aeb41ea..a0675f57a398 100644
--- a/drivers/gpu/drm/xe/xe_sync.c
+++ b/drivers/gpu/drm/xe/xe_sync.c
@@ -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 err;
-
-	if (sync->fence) {
-		err = drm_sched_job_add_dependency(&job->drm,
-						   dma_fence_get(sync->fence));
-		if (err) {
-			dma_fence_put(sync->fence);
-			return err;
-		}
-	}
+	if (sync->fence)
+		return  drm_sched_job_add_dependency(&job->drm,
+						     dma_fence_get(sync->fence));
 
 	return 0;
 }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-08-27  8:43 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-20  9:02 [PATCH 1/3] drm/xe: Remove extra dma_fence_put on xe_sync_entry_add_deps failure Himal Prasad Ghimiray
2024-08-20  8:55 ` ✓ CI.Patch_applied: success for series starting with [1/3] " Patchwork
2024-08-20  8:56 ` ✓ CI.checkpatch: " Patchwork
2024-08-20  8:57 ` ✓ CI.KUnit: " Patchwork
2024-08-20  9:02 ` [PATCH 2/3] drm/xe: Remove unrequired NULL checks in xe_sync_entry_cleanup Himal Prasad Ghimiray
2024-08-20 16:05   ` Matthew Brost
2024-08-27  8:28   ` Nirmoy Das
2024-08-20  9:02 ` [PATCH 3/3] drm/xe: Remove unrequired NULL check in xe_sched_job_free_fences Himal Prasad Ghimiray
2024-08-20 16:05   ` Matthew Brost
2024-08-20 17:06   ` Randhawa, Jagmeet
2024-08-27  8:29   ` Nirmoy Das
2024-08-20  9:09 ` ✓ CI.Build: success for series starting with [1/3] drm/xe: Remove extra dma_fence_put on xe_sync_entry_add_deps failure Patchwork
2024-08-20  9:11 ` ✓ CI.Hooks: " Patchwork
2024-08-20  9:13 ` ✓ CI.checksparse: " Patchwork
2024-08-20  9:33 ` ✓ CI.BAT: " Patchwork
2024-08-20 14:16 ` ✓ CI.FULL: " Patchwork
2024-08-27  8:43   ` Nirmoy Das
2024-08-20 16:02 ` [PATCH 1/3] " Matthew Brost
2024-08-20 18:52 ` Dixit, Ashutosh
2024-08-27  8:29 ` Nirmoy Das

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox