diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 21270029f07b579e8ec96f6fde3b35d1c16b6311..e5c38179f728391df9136db768501a09b28cacb4 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -1503,9 +1503,8 @@ static int dso__load_kernel_sym(struct dso *dso, struct map *map, free(kallsyms_allocated_filename); if (err > 0) { + dso__set_long_name(dso, strdup("[kernel.kallsyms]")); out_fixup: - if (kallsyms_filename != NULL) - dso__set_long_name(dso, strdup("[kernel.kallsyms]")); map__fixup_start(map); map__fixup_end(map); }