diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 30254eb63709..21e4416c7aa0 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c @@ -333,7 +333,7 @@ sort__sym_cmp(struct hist_entry *left, struct hist_entry *right) * comparing symbol address alone is not enough since it's a * relative address within a dso. */ - if (!hists__has(left->hists, dso) || hists__has(right->hists, dso)) { + if (!hists__has(left->hists, dso)) { ret = sort__dso_cmp(left, right); if (ret != 0) return ret;