From: Heiko Carstens Date: Mon, 2 Sep 2013 08:31:11 +0000 (+0200) Subject: s390/kprobes: have more correct if statement in s390_get_insn_slot() X-Git-Tag: next-20131018~95^2~42 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6d002ae1d9319298ec02c64758fb42995affe2f1;p=karo-tx-linux.git s390/kprobes: have more correct if statement in s390_get_insn_slot() When checking the insn address wether it is a kernel image or module address it should be an if-else-if statement not two independent if statements. This doesn't really fix a bug, but matches s390_free_insn_slot(). Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index d86e64eddb42..9f99ad7fc212 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c @@ -252,7 +252,7 @@ static int __kprobes s390_get_insn_slot(struct kprobe *p) p->ainsn.insn = NULL; if (is_kernel_addr(p->addr)) p->ainsn.insn = get_dmainsn_slot(); - if (is_module_addr(p->addr)) + else if (is_module_addr(p->addr)) p->ainsn.insn = get_insn_slot(); return p->ainsn.insn ? 0 : -ENOMEM; }