From: Dan Carpenter Date: Tue, 6 Apr 2010 10:45:39 +0000 (+0300) Subject: proc: copy_to_user() returns unsigned X-Git-Tag: MMI-PSA29.97-13-9~24211 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=309361e09ca9e9670dc8664e5d14125bf82078af;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git proc: copy_to_user() returns unsigned copy_to_user() returns the number of bytes left to be copied. This was a typo from: d82ef020cf31 "proc: pagemap: Hold mmap_sem during page walk". Signed-off-by: Dan Carpenter Acked-by: Matt Mackall Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index caf0337dff73..a05a669510a4 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -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; }