Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4980082d authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky
Browse files

[S390] __syscall_return error check.



Fix __syscall_return macro: valid error numbers are in the range
of -1..-4095.

Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 40154b82
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -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;				     \
	}						     \
	}						     \