drm/amdgpu/gfx11: unlock on error in gfx_v11_0_kiq_resume()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 9 May 2022 09:08:49 +0000 (12:08 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 May 2022 21:53:11 +0000 (17:53 -0400)
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>
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

index 79f2a5c5197d08310ec19e87de905cd3c6227670..7614f38ff38197c92b2bf746b438d1dffcb15ac5 100644 (file)
@@ -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);