summaryrefslogtreecommitdiffstats
path: root/kernel/arch/mips/include/asm/ptrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch/mips/include/asm/ptrace.h')
-rw-r--r--kernel/arch/mips/include/asm/ptrace.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/arch/mips/include/asm/ptrace.h b/kernel/arch/mips/include/asm/ptrace.h
index f6fc6aac5..b6578611d 100644
--- a/kernel/arch/mips/include/asm/ptrace.h
+++ b/kernel/arch/mips/include/asm/ptrace.h
@@ -152,7 +152,7 @@ static inline int is_syscall_success(struct pt_regs *regs)
static inline long regs_return_value(struct pt_regs *regs)
{
- if (is_syscall_success(regs))
+ if (is_syscall_success(regs) || !user_mode(regs))
return regs->regs[2];
else
return -regs->regs[2];