summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-05-09 12:08:49 +0300
committerAlex Deucher <alexander.deucher@amd.com>2022-05-10 17:53:11 -0400
commit0d6355844ba18cb3b75054ab1390d8e6f1ab2ffa (patch)
treee666e30aa84a4a200cda4617eb25c67335776bcd /drivers/gpu
parent948ceec7c41574666dd1b78fd6bad4d89cdae452 (diff)
downloadlinux-0d6355844ba18cb3b75054ab1390d8e6f1ab2ffa.tar.bz2
drm/amdgpu/gfx11: unlock on error in gfx_v11_0_kiq_resume()
Add a missing amdgpu_bo_unreserve(ring->mqd_obj) to an error path in gfx_v11_0_kiq_resume(). Fixes: 3d879e81f0f9 ("drm/amdgpu: add init support for GFX11 (v2)") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
index 79f2a5c5197d..7614f38ff381 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -4330,8 +4330,10 @@ static int gfx_v11_0_kiq_resume(struct amdgpu_device *adev)
return r;
r = amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr);
- if (unlikely(r != 0))
+ if (unlikely(r != 0)) {
+ amdgpu_bo_unreserve(ring->mqd_obj);
return r;
+ }
gfx_v11_0_kiq_init_queue(ring);
amdgpu_bo_kunmap(ring->mqd_obj);