public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] microblaze: remove unneeded variable 'err'
@ 2021-03-10  8:50 Yang Li
  2021-03-10  9:30 ` Michal Simek
  2021-03-10 13:00 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Li @ 2021-03-10  8:50 UTC (permalink / raw)
  To: monstr; +Cc: linux-kernel, Yang Li

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@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-10 13:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-10  8:50 [PATCH] microblaze: remove unneeded variable 'err' Yang Li
2021-03-10  9:30 ` Michal Simek
2021-03-10 13:00 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox