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: zhanglianjie <zhanglianjie@uniontech.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
1cbbc8d4f7
commit
db7b81545f
1 changed files with 2 additions and 0 deletions
|
|
@ -834,6 +834,7 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx,
|
|||
handle = msg[2];
|
||||
|
||||
if (handle == 0) {
|
||||
amdgpu_bo_kunmap(bo);
|
||||
DRM_ERROR("Invalid UVD handle!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
||||
amdgpu_bo_kunmap(bo);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue