Skip to content

Commit

Permalink
xtensa: fix syscall_set_return_value
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jcmvbkbc committed Nov 26, 2019
1 parent d80a505 commit c2d9aa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/xtensa/include/asm/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static inline void syscall_set_return_value(struct task_struct *task,
struct pt_regs *regs,
int error, long val)
{
regs->areg[0] = (long) error ? error : val;
regs->areg[2] = (long) error ? error : val;
}

#define SYSCALL_MAX_ARGS 6
Expand Down

0 comments on commit c2d9aa3

Please sign in to comment.