[PATCH 2/3] drm/amdgpu: Drop impossible condition from amdgpu_job_prepare_job

Tvrtko Ursulin tursulin at igalia.com
Tue Sep 24 09:51:44 UTC 2024


From: Tvrtko Ursulin <tvrtko.ursulin at igalia.com>

Fence has been initialised to NULL so no need to test it.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at igalia.com>
Cc: Christian König <christian.koenig at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
index 570820edcfda..d11cb0ad8c49 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@ -353,7 +353,7 @@ amdgpu_job_prepare_job(struct drm_sched_job *sched_job,
 	if (r)
 		goto error;
 
-	if (!fence && job->gang_submit)
+	if (job->gang_submit)
 		fence = amdgpu_device_switch_gang(ring->adev, job->gang_submit);
 
 	while (!fence && job->vm && !job->vmid) {
-- 
2.46.0



More information about the amd-gfx mailing list