Skip to content

Commit

Permalink
MIPS,bpf: fix missing break in switch statement
Browse files Browse the repository at this point in the history
There is a missing break causing a fall-through and setting
ctx.use_bbit_insns to the wrong value. Fix this by adding the
missing break.

Detected with cppcheck:
"Variable 'ctx.use_bbit_insns' is reassigned a value before the old
one has been used. 'break;' missing?"

Fixes: 8d8d18c ("MIPS,bpf: Fix using smp_processor_id() in preemptible splat.")
Signed-off-by: Colin Ian King <[email protected]>
Acked-by: David Daney <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Colin Ian King authored and davem330 committed Aug 22, 2017
1 parent 9695fe6 commit 4a00aa0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/mips/net/ebpf_jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1892,6 +1892,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
case CPU_CAVIUM_OCTEON2:
case CPU_CAVIUM_OCTEON3:
ctx.use_bbit_insns = 1;
break;
default:
ctx.use_bbit_insns = 0;
}
Expand Down

0 comments on commit 4a00aa0

Please sign in to comment.