summaryrefslogtreecommitdiff
path: root/arch/sparc/include/asm/uaccess_64.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/include/asm/uaccess_64.h')
-rw-r--r--arch/sparc/include/asm/uaccess_64.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h
index dbc141660994..2406788bfe5f 100644
--- a/arch/sparc/include/asm/uaccess_64.h
+++ b/arch/sparc/include/asm/uaccess_64.h
@@ -221,8 +221,8 @@ extern unsigned long copy_from_user_fixup(void *to, const void __user *from,
static inline unsigned long __must_check
copy_from_user(void *to, const void __user *from, unsigned long size)
{
- unsigned long ret = (unsigned long) -EFAULT;
int sz = __compiletime_object_size(to);
+ unsigned long ret = size;
if (likely(sz == -1 || sz >= size)) {
ret = ___copy_from_user(to, from, size);