diff options
author | zhanglianjie <zhanglianjie@uniontech.com> | 2022-02-08 11:03:20 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-02-10 00:57:51 +0300 |
commit | 1cbbc8d4f788af4c260ef3cae05902ef7b191197 (patch) | |
tree | b1190c331c4014cf897983948d31280726193ad3 /drivers/gpu/drm/radeon | |
parent | a439b890dbd17457f071e41777aa1d17916258d6 (diff) | |
download | linux-1cbbc8d4f788af4c260ef3cae05902ef7b191197.tar.xz |
drm/radeon/uvd: Fix forgotten unmap buffer objects
After the buffer object is successfully mapped,
call radeon_bo_kunmap before the function returns.
Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_uvd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c index 377f9cdb5b53..0558d928d98d 100644 --- a/drivers/gpu/drm/radeon/radeon_uvd.c +++ b/drivers/gpu/drm/radeon/radeon_uvd.c @@ -497,6 +497,7 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo, handle = msg[2]; if (handle == 0) { + radeon_bo_kunmap(bo); DRM_ERROR("Invalid UVD handle!\n"); return -EINVAL; } @@ -559,12 +560,10 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo, return 0; default: - DRM_ERROR("Illegal UVD message type (%d)!\n", msg_type); - return -EINVAL; } - BUG(); + radeon_bo_kunmap(bo); return -EINVAL; } |