mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
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>
This commit is contained in:
parent
ad82eef3ce
commit
ea18d43478
2 changed files with 2 additions and 4 deletions
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue