diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 9f8a3f25259a9da4c8535bab07014b07da79a643..3afd354c46f1ebac4e6a86cf5912c763a03725d3 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -634,7 +634,7 @@ static int __kprobes __register_kprobe(struct kprobe *p, * avoid incrementing the module refcount, so as to allow * unloading of self probing modules. */ - if (calling_mod && calling_mod != probed_mod) { + if (calling_mod != probed_mod) { if (unlikely(!try_module_get(probed_mod))) { preempt_enable(); return -EINVAL;