no worries - also fix the typo ( amdgpu_bo_unreserve ->
amdgpu_bo_reserve). Thanks for review.
David
On 2025-11-04 13:56, Alex Deucher wrote:
On Tue, Nov 4, 2025 at 1:52 PM David Wu<[email protected]> wrote:
On 2025-11-04 12:06, Alex Deucher wrote:
On Tue, Nov 4, 2025 at 11:46 AM David (Ming Qiang) Wu<[email protected]> wrote:
unref bo after amdgpu_bo_unreserve() failure as it has
called amdgpu_bo_ref() already
The other error paths need to be fixed as well.
hmm... do you mean "map_error"? it has the amdgpu_bo_unref() already.
whoops, yes, sorry.
Reviewed-by: Alex Deucher<[email protected]>
David
Alex
Signed-off-by: David (Ming Qiang) Wu<[email protected]>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
2.43.0