diff --git a/drivers/amlogic/media/osd/osd_fb.c b/drivers/amlogic/media/osd/osd_fb.c index 6d09a9029a6d..45f1ba6a1c06 100644 --- a/drivers/amlogic/media/osd/osd_fb.c +++ b/drivers/amlogic/media/osd/osd_fb.c @@ -1543,7 +1543,6 @@ static int osd_mmap(struct fb_info *info, struct vm_area_struct *vma) 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; } @@ -1551,7 +1550,6 @@ static int osd_mmap(struct fb_info *info, struct vm_area_struct *vma) start = info->fix.mmio_start; len = info->fix.mmio_len; } - mutex_unlock(&info->mm_lock); vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); diff --git a/drivers/amlogic/media/osd/osd_virtual.c b/drivers/amlogic/media/osd/osd_virtual.c index 0f7ab7b6600a..cf08dd7f3e8d 100644 --- a/drivers/amlogic/media/osd/osd_virtual.c +++ b/drivers/amlogic/media/osd/osd_virtual.c @@ -612,7 +612,6 @@ static int virt_osd_mmap(struct fb_info *info, struct vm_area_struct *vma) 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; } @@ -620,7 +619,6 @@ static int virt_osd_mmap(struct fb_info *info, struct vm_area_struct *vma) start = info->fix.mmio_start; len = info->fix.mmio_len; } - mutex_unlock(&info->mm_lock); vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);