summaryrefslogtreecommitdiff
path: root/arch/loongarch/kernel/traps.c
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2022-06-18 16:39:11 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2022-06-25 18:06:07 +0800
commitea18d434781105ce61ff3ef7f74c9e51812f0580 (patch)
treeebc21baf6f760938a69d08f1b38edc5dc5cfb418 /arch/loongarch/kernel/traps.c
parentad82eef3cebf8cd4f67e20b902e6d02e679e2ef1 (diff)
LoongArch: Make compute_return_era() return void
compute_return_era() always returns 0, make it return void, and then no need to check its return value for its callers. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/kernel/traps.c')
-rw-r--r--arch/loongarch/kernel/traps.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/loongarch/kernel/traps.c b/arch/loongarch/kernel/traps.c
index e4060f84a221..1bf58c65e2bf 100644
--- a/arch/loongarch/kernel/traps.c
+++ b/arch/loongarch/kernel/traps.c
@@ -475,8 +475,7 @@ asmlinkage void noinstr do_ri(struct pt_regs *regs)
die_if_kernel("Reserved instruction in kernel code", regs);
- if (unlikely(compute_return_era(regs) < 0))
- goto out;
+ compute_return_era(regs);
if (unlikely(get_user(opcode, era) < 0)) {
status = SIGSEGV;