Skip to content

Commit 4bdffd2

Browse files
intel-lab-lkptorvalds
authored andcommitted
arch/csky/kernel/probes/kprobes.c: fix bugon.cocci warnings
Use BUG_ON instead of a if condition followed by BUG. Generated by: scripts/coccinelle/misc/bugon.cocci Link: https://lkml.kernel.org/r/alpine.DEB.2.22.394.2107061049150.7197@hadrien Fixes: 7d37cb2 ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS") Signed-off-by: kernel test robot <[email protected]> Signed-off-by: Julia Lawall <[email protected]> Reported-by: kernel test robot <[email protected]> Cc: Julian Braha <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 9673e00 commit 4bdffd2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/csky/kernel/probes/kprobes.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,7 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, unsigned int trapnr)
283283
* normal page fault.
284284
*/
285285
regs->pc = (unsigned long) cur->addr;
286-
if (!instruction_pointer(regs))
287-
BUG();
286+
BUG_ON(!instruction_pointer(regs));
288287

289288
if (kcb->kprobe_status == KPROBE_REENTER)
290289
restore_previous_kprobe(kcb);

0 commit comments

Comments
 (0)