[PATCH 06/13] mips: ptrace: user_regset_copyin_ignore() always returns 0

Sergey Shtylyov posted 13 patches 3 years, 5 months ago
[PATCH 06/13] mips: ptrace: user_regset_copyin_ignore() always returns 0
Posted by Sergey Shtylyov 3 years, 5 months ago
user_regset_copyin_ignore() always returns 0, so checking its result seems
pointless -- don't do this anymore...

Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 arch/mips/kernel/ptrace.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index 567aec4abac0..d9df543f7e2c 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -531,10 +531,11 @@ static int fpr_set(struct task_struct *target,
 		ptrace_setfcr31(target, fcr31);
 	}
 
-	if (count > 0)
-		err = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
-						fir_pos,
-						fir_pos + sizeof(u32));
+	if (count > 0) {
+		user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
+					  fir_pos, fir_pos + sizeof(u32));
+		return 0;
+	}
 
 	return err;
 }
-- 
2.26.3
Re: [PATCH 06/13] mips: ptrace: user_regset_copyin_ignore() always returns 0
Posted by Philippe Mathieu-Daudé 3 years, 5 months ago
On 14/10/22 23:22, Sergey Shtylyov wrote:
> user_regset_copyin_ignore() always returns 0, so checking its result seems
> pointless -- don't do this anymore...
> 
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> ---
>   arch/mips/kernel/ptrace.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>