]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: fix error handling in ib_schedule()
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 29 Dec 2025 20:24:10 +0000 (15:24 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Jan 2026 02:53:18 +0000 (21:53 -0500)
If fence emit fails, free the fence if necessary.

Fixes: db36632ea51e ("drm/amdgpu: clean up and unify hw fence handling")
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 5eb680a06007f2f6ea333d11a4e29039da90614b)

drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c

index 586a58facca10d36eb52db54b4fc53e663cf2f03..72ec455fa932ca4e983b33b7558b01e7dc3e5d36 100644 (file)
@@ -302,7 +302,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned int num_ibs,
                if (job && job->vmid)
                        amdgpu_vmid_reset(adev, ring->vm_hub, job->vmid);
                amdgpu_ring_undo(ring);
-               return r;
+               goto free_fence;
        }
        *f = &af->base;
        /* get a ref for the job */