Skip to content

Commit f1204e5

Browse files
TianyouLinamhyung
authored andcommitted
perf annotate: Check return value of evsel__get_arch() properly
Check the error code of evsel__get_arch() in the symbol__annotate(). Previously it checked non-zero value but after the refactoring it does only for negative values. Fixes: 0669729 ("perf annotate: Factor out evsel__get_arch()") Suggested-by: James Clark <james.clark@linaro.org> Acked-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Tianyou Li <tianyou.li@intel.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
1 parent 262c614 commit f1204e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/util/annotate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ int symbol__annotate(struct map_symbol *ms, struct evsel *evsel,
10211021
int err, nr;
10221022

10231023
err = evsel__get_arch(evsel, &arch);
1024-
if (err < 0)
1024+
if (err)
10251025
return err;
10261026

10271027
if (parch)

0 commit comments

Comments
 (0)