summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/kprobes.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2013-09-02 08:31:11 (GMT)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-10-24 15:16:45 (GMT)
commitfcd05b50fca44be3f96f8a17c5cce778669c29e7 (patch)
tree7998eb11586dee5eb488aa5c6272f3dd088f8bbb /arch/s390/kernel/kprobes.c
parentfaf499dfccfd88d842164078917e7b6aae9a3cdb (diff)
downloadlinux-fcd05b50fca44be3f96f8a17c5cce778669c29e7.tar.xz
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 <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/kprobes.c')
-rw-r--r--arch/s390/kernel/kprobes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index d86e64e..9f99ad7 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;
}