Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: ptrace: user_regset_copyin_ignore() always returns 0

user_regset_copyin_ignore() always returns 0, so checking its result seems
pointless -- don't do this anymore...

Link: https://lkml.kernel.org/r/20221014212235.10770-12-s.shtylyov@omp.ru
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Cc: Brian Cain <bcain@quicinc.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: David S. Miller <davem@davemloft.net>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Rich Felker <dalias@libc.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Will Deacon <will@kernel.org>
Cc: Yoshinori Sato <ysato@users.osdn.me>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Sergey Shtylyov and committed by
Andrew Morton
aafdac9a 18b9fe54

+4 -4
+4 -4
arch/sh/kernel/ptrace_32.c
··· 157 157 offsetof(struct pt_regs, pc), 158 158 sizeof(struct pt_regs)); 159 159 if (!ret) 160 - ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 161 - sizeof(struct pt_regs), -1); 160 + user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 161 + sizeof(struct pt_regs), -1); 162 162 163 163 return ret; 164 164 } ··· 229 229 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 230 230 0, sizeof(struct pt_dspregs)); 231 231 if (!ret) 232 - ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 233 - sizeof(struct pt_dspregs), -1); 232 + user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 233 + sizeof(struct pt_dspregs), -1); 234 234 235 235 return ret; 236 236 }