mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-01 17:04:41 +07:00
[S390] __syscall_return error check.
Fix __syscall_return macro: valid error numbers are in the range of -1..-4095. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
40154b8243
commit
4980082db1
@ -394,11 +394,9 @@
|
|||||||
|
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
|
|
||||||
/* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */
|
|
||||||
|
|
||||||
#define __syscall_return(type, res) \
|
#define __syscall_return(type, res) \
|
||||||
do { \
|
do { \
|
||||||
if ((unsigned long)(res) >= (unsigned long)(-125)) { \
|
if ((unsigned long)(res) >= (unsigned long)(-4095)) {\
|
||||||
errno = -(res); \
|
errno = -(res); \
|
||||||
res = -1; \
|
res = -1; \
|
||||||
} \
|
} \
|
||||||
|
Loading…
Reference in New Issue
Block a user