diff options
-rw-r--r-- | tools/perf/util/annotate.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 0b8573fd9b05..15be9d271f55 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -932,9 +932,8 @@ static int symbol__inc_addr_samples(struct symbol *sym, struct map *map, if (sym == NULL) return 0; src = symbol__hists(sym, evsel->evlist->nr_entries); - if (src == NULL) - return -ENOMEM; - return __symbol__inc_addr_samples(sym, map, src, evsel->idx, addr, sample); + return (src) ? __symbol__inc_addr_samples(sym, map, src, evsel->idx, + addr, sample) : 0; } static int symbol__account_cycles(u64 addr, u64 start, |