diff options
Diffstat (limited to 'include/asm-sh')
-rw-r--r-- | include/asm-sh/unistd.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h index 080e5729f17d..5d5e9f94def5 100644 --- a/include/asm-sh/unistd.h +++ b/include/asm-sh/unistd.h | |||
@@ -329,11 +329,14 @@ | |||
329 | 329 | ||
330 | #ifdef __KERNEL__ | 330 | #ifdef __KERNEL__ |
331 | 331 | ||
332 | /* user-visible error numbers are in the range -1 - -124: see <asm-sh/errno.h> */ | 332 | #include <linux/err.h> |
333 | |||
334 | /* user-visible error numbers are in the range -1 - -MAX_ERRNO: | ||
335 | * see <asm-sh/errno.h> */ | ||
333 | 336 | ||
334 | #define __syscall_return(type, res) \ | 337 | #define __syscall_return(type, res) \ |
335 | do { \ | 338 | do { \ |
336 | if ((unsigned long)(res) >= (unsigned long)(-124)) { \ | 339 | if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \ |
337 | /* Avoid using "res" which is declared to be in register r0; \ | 340 | /* Avoid using "res" which is declared to be in register r0; \ |
338 | errno might expand to a function call and clobber it. */ \ | 341 | errno might expand to a function call and clobber it. */ \ |
339 | int __err = -(res); \ | 342 | int __err = -(res); \ |