Commit ea18d434 authored by Tiezhu Yang's avatar Tiezhu Yang Committed by Huacai Chen

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: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent ad82eef3
...@@ -12,10 +12,9 @@ static inline unsigned long exception_era(struct pt_regs *regs) ...@@ -12,10 +12,9 @@ static inline unsigned long exception_era(struct pt_regs *regs)
return regs->csr_era; return regs->csr_era;
} }
static inline int compute_return_era(struct pt_regs *regs) static inline void compute_return_era(struct pt_regs *regs)
{ {
regs->csr_era += 4; regs->csr_era += 4;
return 0;
} }
#endif /* _ASM_BRANCH_H */ #endif /* _ASM_BRANCH_H */
...@@ -475,8 +475,7 @@ asmlinkage void noinstr do_ri(struct pt_regs *regs) ...@@ -475,8 +475,7 @@ asmlinkage void noinstr do_ri(struct pt_regs *regs)
die_if_kernel("Reserved instruction in kernel code", regs); die_if_kernel("Reserved instruction in kernel code", regs);
if (unlikely(compute_return_era(regs) < 0)) compute_return_era(regs);
goto out;
if (unlikely(get_user(opcode, era) < 0)) { if (unlikely(get_user(opcode, era) < 0)) {
status = SIGSEGV; status = SIGSEGV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment