]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu/userq: need to unref bo
authorDavid (Ming Qiang) Wu <David.Wu3@amd.com>
Tue, 28 Oct 2025 22:42:05 +0000 (18:42 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Nov 2025 14:56:25 +0000 (09:56 -0500)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c

index 2aeeaa9548820b55dc74654ae6e0970b578f80db..99ae1d19b7510d8161c079b9a75e5ffe0bb326db 100644 (file)
@@ -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;
        }