Commit 309361e0 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Torvalds

proc: copy_to_user() returns unsigned

copy_to_user() returns the number of bytes left to be copied.

This was a typo from: d82ef020 "proc: pagemap: Hold mmap_sem during
page walk".
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarMatt Mackall <mpm@selenic.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5fbfb18d
......@@ -800,7 +800,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
start_vaddr = end;
len = min(count, PM_ENTRY_BYTES * pm.pos);
if (copy_to_user(buf, pm.buffer, len) < 0) {
if (copy_to_user(buf, pm.buffer, len)) {
ret = -EFAULT;
goto out_free;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment