Commit db7b8154 authored by zhanglianjie's avatar zhanglianjie Committed by Alex Deucher

drm/amd/amdgpu/amdgpu_uvd: Fix forgotten unmap buffer object

After the buffer object is successfully mapped,
call amdgpu_bo_kunmap before the function returns.
Signed-off-by: default avatarzhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1cbbc8d4
...@@ -834,6 +834,7 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx, ...@@ -834,6 +834,7 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx,
handle = msg[2]; handle = msg[2];
if (handle == 0) { if (handle == 0) {
amdgpu_bo_kunmap(bo);
DRM_ERROR("Invalid UVD handle!\n"); DRM_ERROR("Invalid UVD handle!\n");
return -EINVAL; return -EINVAL;
} }
...@@ -892,6 +893,7 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx, ...@@ -892,6 +893,7 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx,
DRM_ERROR("Illegal UVD message type (%d)!\n", msg_type); DRM_ERROR("Illegal UVD message type (%d)!\n", msg_type);
} }
amdgpu_bo_kunmap(bo);
return -EINVAL; return -EINVAL;
} }
......
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