]> Git Repo - J-linux.git/commitdiff
RISC-V: Remove redundant err variable
authorMinghao Chi <[email protected]>
Wed, 12 Jan 2022 08:27:29 +0000 (08:27 +0000)
committerPalmer Dabbelt <[email protected]>
Thu, 20 Jan 2022 18:24:12 +0000 (10:24 -0800)
Return value from user_regset_copyin() directly instead of taking this
in another redundant variable.

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Minghao Chi <[email protected]>
Signed-off-by: CGEL ZTE <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
arch/riscv/kernel/ptrace.c

index 9c0511119bad9bada528a858ea5e82dc1453b060..a892437301538653778c77785a72cb3ffb66b823 100644 (file)
@@ -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
This page took 0.04118 seconds and 4 git commands to generate.