proc: copy_to_user() returns unsigned

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

This was a typo from: d82ef020cf "proc: pagemap: Hold mmap_sem during
page walk".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Dan Carpenter 2010-04-06 13:45:39 +03:00 committed by Linus Torvalds
parent 5fbfb18d7a
commit 309361e09c

View File

@ -800,7 +800,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
start_vaddr = end; start_vaddr = end;
len = min(count, PM_ENTRY_BYTES * pm.pos); 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; ret = -EFAULT;
goto out_free; goto out_free;
} }