lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220118075115.925468-1-chi.minghao@zte.com.cn>
Date:   Tue, 18 Jan 2022 07:51:15 +0000
From:   cgel.zte@...il.com
To:     oleg@...hat.com
Cc:     hca@...ux.ibm.com, gor@...ux.ibm.com, borntraeger@...ux.ibm.com,
        agordeev@...ux.ibm.com, linux-s390@...r.kernel.org,
        linux-kernel@...r.kernel.org, Minghao Chi <chi.minghao@....com.cn>,
        Zeal Robot <zealci@....com.cn>, CGEL ZTE <cgel.zte@...il.com>
Subject: [PATCH] arch/s390/kernel: remove unneeded rc variable

From: Minghao Chi <chi.minghao@....com.cn>

Return value from user_regset_copyin() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@...il.com>
---
 arch/s390/kernel/ptrace.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index 0ea3d02b378d..2ac936ae7b2b 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -1048,16 +1048,13 @@ static int s390_vxrs_high_set(struct task_struct *target,
 			      unsigned int pos, unsigned int count,
 			      const void *kbuf, const void __user *ubuf)
 {
-	int rc;
-
 	if (!MACHINE_HAS_VX)
 		return -ENODEV;
 	if (target == current)
 		save_fpu_regs();
 
-	rc = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
+	return user_regset_copyin(&pos, &count, &kbuf, &ubuf,
 				target->thread.fpu.vxrs + __NUM_VXRS_LOW, 0, -1);
-	return rc;
 }
 
 static int s390_system_call_get(struct task_struct *target,
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ