Commit fcd05b50 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

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: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent faf499df
...@@ -252,7 +252,7 @@ static int __kprobes s390_get_insn_slot(struct kprobe *p) ...@@ -252,7 +252,7 @@ static int __kprobes s390_get_insn_slot(struct kprobe *p)
p->ainsn.insn = NULL; p->ainsn.insn = NULL;
if (is_kernel_addr(p->addr)) if (is_kernel_addr(p->addr))
p->ainsn.insn = get_dmainsn_slot(); 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(); p->ainsn.insn = get_insn_slot();
return p->ainsn.insn ? 0 : -ENOMEM; return p->ainsn.insn ? 0 : -ENOMEM;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment