summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/kprobes.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/kprobes.h')
-rw-r--r--arch/mips/include/asm/kprobes.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/include/asm/kprobes.h b/arch/mips/include/asm/kprobes.h
index 291846d9ba83..ad1a99948f27 100644
--- a/arch/mips/include/asm/kprobes.h
+++ b/arch/mips/include/asm/kprobes.h
@@ -43,7 +43,8 @@ typedef union mips_instruction kprobe_opcode_t;
#define flush_insn_slot(p) \
do { \
- flush_icache_range((unsigned long)p->addr, \
+ if (p->addr) \
+ flush_icache_range((unsigned long)p->addr, \
(unsigned long)p->addr + \
(MAX_INSN_SIZE * sizeof(kprobe_opcode_t))); \
} while (0)