drm/amdgpu: Drop impossible condition from amdgpu_job_prepare_job
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Tue, 24 Sep 2024 09:51:44 +0000 (10:51 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Oct 2024 13:43:39 +0000 (09:43 -0400)
Fence has been initialised to NULL so no need to test it.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c

index e3bb234..b550a31 100644 (file)
@@ -356,7 +356,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) {