drm/msm: deal with exhausted vmap space better
Some, but not all, callers of obj->vmap() would check if return IS_ERR(). So let's actually return an error if vmap() fails. And fixup the call-sites that were not handling this properly. Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
@@ -398,6 +398,8 @@ void *msm_gem_vaddr_locked(struct drm_gem_object *obj)
|
||||
return ERR_CAST(pages);
|
||||
msm_obj->vaddr = vmap(pages, obj->size >> PAGE_SHIFT,
|
||||
VM_MAP, pgprot_writecombine(PAGE_KERNEL));
|
||||
if (msm_obj->vaddr == NULL)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
return msm_obj->vaddr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user