diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 3919ddf26d15e192d837eae9eb9e5fb291da816c..6d1631df3e9cd13b146063a5f42a27e0017b7e10 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -1614,7 +1614,7 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil build_id_path = strdup(filename); if (!build_id_path) - return -1; + return ENOMEM; /* * old style build-id cache has name of XX/XXXXXXX.. while @@ -2732,7 +2732,7 @@ int symbol__annotate2(struct symbol *sym, struct map *map, struct perf_evsel *ev notes->offsets = zalloc(size * sizeof(struct annotation_line *)); if (notes->offsets == NULL) - return -1; + return ENOMEM; if (perf_evsel__is_group_event(evsel)) nr_pcnt = evsel->nr_members;