summaryrefslogtreecommitdiff
path: root/include/asm-v850/unistd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-v850/unistd.h')
-rw-r--r--include/asm-v850/unistd.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asm-v850/unistd.h b/include/asm-v850/unistd.h
index bcb44bfe577a..552b7c873a57 100644
--- a/include/asm-v850/unistd.h
+++ b/include/asm-v850/unistd.h
@@ -238,12 +238,13 @@
#ifdef __KERNEL__
#include <asm/clinkage.h>
+#include <linux/err.h>
#define __syscall_return(type, res) \
do { \
- /* user-visible error numbers are in the range -1 - -124: \
+ /* user-visible error numbers are in the range -1 - -MAX_ERRNO: \
see <asm-v850/errno.h> */ \
- if (__builtin_expect ((unsigned long)(res) >= (unsigned long)(-125), 0)) { \
+ if (__builtin_expect ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO), 0)) { \
errno = -(res); \
res = -1; \
} \