mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
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: 0669729eb0 ("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>
This commit is contained in:
parent
262c61435c
commit
f1204e5846
|
|
@ -1021,7 +1021,7 @@ int symbol__annotate(struct map_symbol *ms, struct evsel *evsel,
|
|||
int err, nr;
|
||||
|
||||
err = evsel__get_arch(evsel, &arch);
|
||||
if (err < 0)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (parch)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user