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: <1615366218-7634-1-git-send-email-yang.lee@linux.alibaba.com>
Date:   Wed, 10 Mar 2021 16:50:18 +0800
From:   Yang Li <yang.lee@...ux.alibaba.com>
To:     monstr@...str.eu
Cc:     linux-kernel@...r.kernel.org, Yang Li <yang.lee@...ux.alibaba.com>
Subject: [PATCH] microblaze: remove unneeded variable 'err'

Fix the following coccicheck warning:
./arch/microblaze/kernel/signal.c:60:14-17: Unneeded variable: "err".
Return "0" on line 78

Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
---
 arch/microblaze/kernel/signal.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
index fc61eb0..c4b7b30 100644
--- a/arch/microblaze/kernel/signal.c
+++ b/arch/microblaze/kernel/signal.c
@@ -57,8 +57,6 @@ struct rt_sigframe {
 static int restore_sigcontext(struct pt_regs *regs,
 				struct sigcontext __user *sc, int *rval_p)
 {
-	unsigned int err = 0;
-
 #define COPY(x)		{err |= __get_user(regs->x, &sc->regs.x); }
 	COPY(r0);
 	COPY(r1);
@@ -75,7 +73,7 @@ static int restore_sigcontext(struct pt_regs *regs,
 
 	*rval_p = regs->r3;
 
-	return err;
+	return 0;
 }
 
 asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ