diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 2ed61f59d415ec65c050ec63802e2819d4e06a2a..4e29e80932e5342439e3b189ad0879ba69dc0daf 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -1149,7 +1149,7 @@ static int machine__process_kernel_mmap_event(struct machine *machine, struct dso *dso; list_for_each_entry(dso, &machine->dsos.head, node) { - if (dso->kernel && is_kernel_module(dso->long_name)) + if (!dso->kernel || is_kernel_module(dso->long_name)) continue; kernel = dso;