[PATCH] drm/gma500: simplify a condition in psbfb_mmap()
Dan Carpenter
dan.carpenter at oracle.com
Fri Mar 23 11:44:29 UTC 2018
Since we enforce that "vma->vm_pgoff" has to be zero it means we don't
need an additional cap on the upper bound.
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index cb0a2ae916e0..a6732bffb2e2 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -166,9 +166,7 @@ static int psbfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
struct psb_fbdev *fbdev = info->par;
struct psb_framebuffer *psbfb = &fbdev->pfb;
- if (vma->vm_pgoff != 0)
- return -EINVAL;
- if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT))
+ if (vma->vm_pgoff)
return -EINVAL;
if (!psbfb->addr_space)
More information about the dri-devel
mailing list