Commit 8da46c0f authored by Minghao Chi's avatar Minghao Chi Committed by Palmer Dabbelt

RISC-V: Remove redundant err variable

Return value from user_regset_copyin() directly instead of taking this
in another redundant variable.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: default avatarCGEL ZTE <cgel.zte@gmail.com>
Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent db3f02df
...@@ -42,12 +42,10 @@ static int riscv_gpr_set(struct task_struct *target, ...@@ -42,12 +42,10 @@ static int riscv_gpr_set(struct task_struct *target,
unsigned int pos, unsigned int count, unsigned int pos, unsigned int count,
const void *kbuf, const void __user *ubuf) const void *kbuf, const void __user *ubuf)
{ {
int ret;
struct pt_regs *regs; struct pt_regs *regs;
regs = task_pt_regs(target); regs = task_pt_regs(target);
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1); return user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1);
return ret;
} }
#ifdef CONFIG_FPU #ifdef CONFIG_FPU
......
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