提交 1c525b0b 编写于 作者: T Tiezhu Yang 提交者: Hongchen Zhang

LoongArch: Make compute_return_era() return void

mainline inclusion
from mainline-v5.19-rc4
commit ea18d434
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5OHOB
CVE: NA

--------------------------------

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: NTiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
上级 92e68d9a
......@@ -12,10 +12,9 @@ static inline unsigned long exception_era(struct pt_regs *regs)
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;
return 0;
}
#endif /* _ASM_BRANCH_H */
......@@ -477,8 +477,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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册