summaryrefslogtreecommitdiff
path: root/lib/strncpy_from_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/strncpy_from_user.c')
-rw-r--r--lib/strncpy_from_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c
index 9d2683b521ae..2e03567e1e6b 100644
--- a/lib/strncpy_from_user.c
+++ b/lib/strncpy_from_user.c
@@ -44,7 +44,7 @@ static inline long do_strncpy_from_user(char *dst, const char __user *src, long
ret = __get_user(c, src + res);
if (ret)
- return -ret;
+ return -EFAULT;
dst[res] = c;
if (!c)
return res;