Skip to content

Commit c2d9aa3

Browse files
committed
xtensa: fix syscall_set_return_value
syscall return value is in the register a2, not a0. Cc: [email protected] # v5.0+ Fixes: 9f24f3c ("xtensa: implement tracehook functions and enable HAVE_ARCH_TRACEHOOK") Signed-off-by: Max Filippov <[email protected]>
1 parent d80a505 commit c2d9aa3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/xtensa/include/asm/syscall.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static inline void syscall_set_return_value(struct task_struct *task,
5151
struct pt_regs *regs,
5252
int error, long val)
5353
{
54-
regs->areg[0] = (long) error ? error : val;
54+
regs->areg[2] = (long) error ? error : val;
5555
}
5656

5757
#define SYSCALL_MAX_ARGS 6

0 commit comments

Comments
 (0)