summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/msm_fbdev.c
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2016-05-25 01:29:38 +0300
committerRob Clark <robdclark@gmail.com>2016-06-04 21:45:48 +0300
commit69a834c28fb514403eb91a4f0120da214a52e056 (patch)
tree718733cb1bdaea6feb4a831e14838d03d19ef85c /drivers/gpu/drm/msm/msm_fbdev.c
parentab3ab68493aaac6fea4ad1bb597def9f48f41c71 (diff)
downloadlinux-69a834c28fb514403eb91a4f0120da214a52e056.tar.xz
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>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_fbdev.c')
-rw-r--r--drivers/gpu/drm/msm/msm_fbdev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
index d9759bf3482e..c6cf837c5193 100644
--- a/drivers/gpu/drm/msm/msm_fbdev.c
+++ b/drivers/gpu/drm/msm/msm_fbdev.c
@@ -159,6 +159,10 @@ static int msm_fbdev_create(struct drm_fb_helper *helper,
dev->mode_config.fb_base = paddr;
fbi->screen_base = msm_gem_vaddr_locked(fbdev->bo);
+ if (IS_ERR(fbi->screen_base)) {
+ ret = PTR_ERR(fbi->screen_base);
+ goto fail_unlock;
+ }
fbi->screen_size = fbdev->bo->size;
fbi->fix.smem_start = paddr;
fbi->fix.smem_len = fbdev->bo->size;