Skip to content

Commit b665f29

Browse files
davidwuAMDalexdeucher
authored andcommitted
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>
1 parent 1349b31 commit b665f29

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ static int amdgpu_userq_fence_read_wptr(struct amdgpu_usermode_queue *queue,
386386
amdgpu_bo_unreserve(queue->vm->root.bo);
387387
r = amdgpu_bo_reserve(bo, true);
388388
if (r) {
389+
amdgpu_bo_unref(&bo);
389390
DRM_ERROR("Failed to reserve userqueue wptr bo");
390391
return r;
391392
}

0 commit comments

Comments
 (0)