summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2025-12-29 23:24:10 +0300
committerAlex Deucher <alexander.deucher@amd.com>2026-01-21 01:25:40 +0300
commit5eb680a06007f2f6ea333d11a4e29039da90614b (patch)
tree7cfec4b1c87952b8917b71f30314b2523a7a6795
parent4321c5cac7f21e88d3bae9a67d5a6008d0b4a9c4 (diff)
downloadlinux-5eb680a06007f2f6ea333d11a4e29039da90614b.tar.xz
drm/amdgpu: fix error handling in ib_schedule()
If fence emit fails, free the fence if necessary. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index 586a58facca1..72ec455fa932 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -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 */