Skip to content

Commit

Permalink
fbdev: fix check for fb_mmap's mmio availability
Browse files Browse the repository at this point in the history
Commit fc9bbca (vm: convert fb_mmap to
vm_iomap_memory() helper) made fbmem.c use vm_iomap_memory, but also
accidentally removed the check for mmio's availability.

Add the check back.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Tomi Valkeinen committed Apr 26, 2013
1 parent 04f8afb commit 138f296
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/video/fbmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,11 @@ fb_mmap(struct file *file, struct vm_area_struct * vma)
len = info->fix.smem_len;
mmio_pgoff = PAGE_ALIGN((start & ~PAGE_MASK) + len) >> PAGE_SHIFT;
if (vma->vm_pgoff >= mmio_pgoff) {
if (info->var.accel_flags) {
mutex_unlock(&info->mm_lock);
return -EINVAL;
}

vma->vm_pgoff -= mmio_pgoff;
start = info->fix.mmio_start;
len = info->fix.mmio_len;
Expand Down

0 comments on commit 138f296

Please sign in to comment.