summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/maccess.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/maccess.c b/mm/maccess.c
index 1b13638d238d..d159b1c96e48 100644
--- a/mm/maccess.c
+++ b/mm/maccess.c
@@ -104,5 +104,5 @@ long strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count)
pagefault_enable();
set_fs(old_fs);
- return ret < 0 ? ret : src - unsafe_addr;
+ return ret ? -EFAULT : src - unsafe_addr;
}