From a978ed3d6454e4aa1a2ac74051ffd77b7d263e44 Mon Sep 17 00:00:00 2001 From: Sunil Khatri Date: Tue, 3 Mar 2026 22:30:04 +0530 Subject: [PATCH] drm/amdgpu/userq: remove queue from doorbell xa during clean up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If function amdgpu_userq_map_helper fails we do need to clean up and remove the queue from the userq_doorbell_xa. Signed-off-by: Sunil Khatri Reviewed-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c index 2716811756d2..3ae7d1f5d115 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c @@ -885,6 +885,7 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args) r = amdgpu_userq_map_helper(queue); if (r) { drm_file_err(uq_mgr->file, "Failed to map Queue\n"); + xa_erase_irq(&adev->userq_doorbell_xa, index); xa_erase(&uq_mgr->userq_xa, qid); amdgpu_userq_fence_driver_free(queue); uq_funcs->mqd_destroy(queue);