mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
Staging: comedi: Use predefined macro offset_in_page() instead of (addr & ~PAGE_MASK).
Use predefined macro offset_in_page() instead of (addr & ~PAGE_MASK). Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f3b1e4db82
commit
44b8c793fc
@@ -2224,7 +2224,7 @@ static int comedi_mmap(struct file *file, struct vm_area_struct *vma)
|
||||
retval = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
if (size & (~PAGE_MASK)) {
|
||||
if (offset_in_page(size)) {
|
||||
retval = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user