提交 068421b1 编写于 作者: P Philip Yang 提交者: Alex Deucher

drm/amdgpu: Free user pages if kvmalloc_array fails

To cleanup the BOs of bo_list which have got user pages.
Signed-off-by: NPhilip Yang <Philip.Yang@amd.com>
Reviewed-by: NChristian König <christian.koenig@amd.com>
Reviewed-by: NFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 11c4328a
...@@ -543,7 +543,8 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, ...@@ -543,7 +543,8 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
GFP_KERNEL | __GFP_ZERO); GFP_KERNEL | __GFP_ZERO);
if (!e->user_pages) { if (!e->user_pages) {
DRM_ERROR("kvmalloc_array failure\n"); DRM_ERROR("kvmalloc_array failure\n");
return -ENOMEM; r = -ENOMEM;
goto out_free_user_pages;
} }
r = amdgpu_ttm_tt_get_user_pages(bo, e->user_pages); r = amdgpu_ttm_tt_get_user_pages(bo, e->user_pages);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册