Skip to content

Commit 8904d5b

Browse files
AMarkovicralfbaechle
authored andcommitted
MIPS: math-emu: Avoid an assignment within if statement condition
Move invocation of fpu_emu() to be out of if statement condition. This makes code easier to follow and debug, and fixes a checkpatch warning. Signed-off-by: Aleksandar Markovic <[email protected]> Cc: Douglas Leung <[email protected]> Cc: Goran Ferenc <[email protected]> Cc: James Hogan <[email protected]> Cc: Maciej W. Rozycki <[email protected]> Cc: Miodrag Dinic <[email protected]> Cc: Paul Burton <[email protected]> Cc: Petar Jovanovic <[email protected]> Cc: Raghu Gandham <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/17586/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent 95306f0 commit 8904d5b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/mips/math-emu/cp1emu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,8 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
13531353
return SIGILL;
13541354

13551355
/* a real fpu computation instruction */
1356-
if ((sig = fpu_emu(xcp, ctx, ir)))
1356+
sig = fpu_emu(xcp, ctx, ir);
1357+
if (sig)
13571358
return sig;
13581359
}
13591360
break;

0 commit comments

Comments
 (0)