Commit 1cbbc8d4 authored by zhanglianjie's avatar zhanglianjie Committed by Alex Deucher

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: default avatarzhanglianjie <zhanglianjie@uniontech.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a439b890
...@@ -497,6 +497,7 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo, ...@@ -497,6 +497,7 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
handle = msg[2]; handle = msg[2];
if (handle == 0) { if (handle == 0) {
radeon_bo_kunmap(bo);
DRM_ERROR("Invalid UVD handle!\n"); DRM_ERROR("Invalid UVD handle!\n");
return -EINVAL; return -EINVAL;
} }
...@@ -559,12 +560,10 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo, ...@@ -559,12 +560,10 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
return 0; return 0;
default: default:
DRM_ERROR("Illegal UVD message type (%d)!\n", msg_type); DRM_ERROR("Illegal UVD message type (%d)!\n", msg_type);
return -EINVAL;
} }
BUG(); radeon_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