summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid (Ming Qiang) Wu <David.Wu3@amd.com>2025-10-28 18:42:05 -0400
committerAlex Deucher <alexander.deucher@amd.com>2025-11-06 09:56:25 -0500
commitb665f29a2f93a266183dc8cd5d732f203157613b (patch)
tree313fa01bd6e07a538a1d58d0f682560fc6b3b3cb
parent1349b31313d5bf840e0ffe780d17acafc4ef81f8 (diff)
drm/amdgpu/userq: need to unref bo
unref bo after amdgpu_bo_reserve() failure as it has called amdgpu_bo_ref() already Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
index 2aeeaa954882..99ae1d19b751 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
@@ -386,6 +386,7 @@ static int amdgpu_userq_fence_read_wptr(struct amdgpu_usermode_queue *queue,
amdgpu_bo_unreserve(queue->vm->root.bo);
r = amdgpu_bo_reserve(bo, true);
if (r) {
+ amdgpu_bo_unref(&bo);
DRM_ERROR("Failed to reserve userqueue wptr bo");
return r;
}