Commit 609d8300 authored by Sukrut Bellary's avatar Sukrut Bellary Committed by Alex Deucher

drm:amd:amdgpu: Fix missing bo unlock in failure path

smatch warning - inconsistent handling of buffer object reserve
and unreserve.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarSukrut Bellary <sukrut.bellary@linux.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e94c2556
......@@ -4686,8 +4686,10 @@ static int gfx_v8_0_kiq_resume(struct amdgpu_device *adev)
return r;
r = amdgpu_bo_kmap(ring->mqd_obj, &ring->mqd_ptr);
if (unlikely(r != 0))
if (unlikely(r != 0)) {
amdgpu_bo_unreserve(ring->mqd_obj);
return r;
}
gfx_v8_0_kiq_init_queue(ring);
amdgpu_bo_kunmap(ring->mqd_obj);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment