Skip to content

Commit

Permalink
microblaze: remove unneeded variable 'err'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yang Li authored and intel-lab-lkp committed Mar 10, 2021
1 parent 144c79e commit 3e5cd1e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/microblaze/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down

0 comments on commit 3e5cd1e

Please sign in to comment.