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

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
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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