summaryrefslogtreecommitdiff
path: root/arch/xtensa
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2019-11-15 02:05:40 +0300
committerMax Filippov <jcmvbkbc@gmail.com>2019-11-26 23:01:45 +0300
commitc2d9aa3b6e56de56c7f1ed9026ca6ec7cfbeef19 (patch)
treeb9b0ea33d9695d0c29c1d9bcd8cab2606cd68ef6 /arch/xtensa
parentd80a505348472093cce6698b837c2b83b5e90390 (diff)
downloadlinux-c2d9aa3b6e56de56c7f1ed9026ca6ec7cfbeef19.tar.xz
xtensa: fix syscall_set_return_value
syscall return value is in the register a2, not a0. Cc: stable@vger.kernel.org # v5.0+ Fixes: 9f24f3c1067c ("xtensa: implement tracehook functions and enable HAVE_ARCH_TRACEHOOK") Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/include/asm/syscall.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h
index 359ab40e935a..c90fb944f9d8 100644
--- a/arch/xtensa/include/asm/syscall.h
+++ b/arch/xtensa/include/asm/syscall.h
@@ -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