diff options
author | zhanglianjie <zhanglianjie@uniontech.com> | 2022-01-29 15:35:23 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-02-09 16:57:52 -0500 |
commit | db7b81545f5abdfd1f13b7f0a3f995994701cf92 (patch) | |
tree | e7c48f885f3ff7914054049a1fe2e5b4cdd5b7db /drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | |
parent | 1cbbc8d4f788af4c260ef3cae05902ef7b191197 (diff) | |
download | linux-db7b81545f5abdfd1f13b7f0a3f995994701cf92.tar.gz linux-db7b81545f5abdfd1f13b7f0a3f995994701cf92.tar.bz2 linux-db7b81545f5abdfd1f13b7f0a3f995994701cf92.zip |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index 6f8de11a17f1..9cc23b220537 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c @@ -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; } |