diff options
author | Minghao Chi <chi.minghao@zte.com.cn> | 2022-01-12 11:27:29 +0300 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2022-01-20 21:24:12 +0300 |
commit | 8da46c0f98a1a17bc8f6d324d82b4d26e1448869 (patch) | |
tree | fe09eba8848645d0ccf7ec5e2997fb8619fd81ee /arch | |
parent | db3f02df1853acf4d678bcddb3f1eab23219b410 (diff) | |
download | linux-8da46c0f98a1a17bc8f6d324d82b4d26e1448869.tar.xz |
RISC-V: Remove redundant err variable
Return value from user_regset_copyin() directly instead of taking this
in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/riscv/kernel/ptrace.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c index 9c0511119bad..a89243730153 100644 --- a/arch/riscv/kernel/ptrace.c +++ b/arch/riscv/kernel/ptrace.c @@ -42,12 +42,10 @@ static int riscv_gpr_set(struct task_struct *target, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) { - int ret; struct pt_regs *regs; regs = task_pt_regs(target); - ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1); - return ret; + return user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1); } #ifdef CONFIG_FPU |