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:
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue