Unping the wptr_obj->obj when amdgpu_ttm_alloc_gart fails.

Signed-off-by: Sunil Khatri <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c 
b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
index 14db2124ff81..aa9dad4039bd 100644
--- a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
+++ b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
@@ -89,6 +89,8 @@ mes_userq_create_wptr_mapping(struct amdgpu_device *adev,
        drm_exec_fini(&exec);
        return 0;
 
+fail_alloc_gart:
+       amdgpu_bo_unpin(wptr_obj->obj);
 fail_map:
        amdgpu_bo_unref(&wptr_obj->obj);
 fail_lock:
-- 
2.34.1

Reply via email to