diff options
| author | Tianyou Li <tianyou.li@intel.com> | 2025-10-20 15:30:05 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-12-18 13:54:45 +0100 |
| commit | c8c93fe1c444a8bf0272555731aba775adf2046c (patch) | |
| tree | 54bc28596d1d3a3e44560f4a61094e8a9a8e6fd4 /tools/perf | |
| parent | cc67b6d82b122e123494c114753203a97d99802b (diff) | |
| download | linux-c8c93fe1c444a8bf0272555731aba775adf2046c.tar.gz linux-c8c93fe1c444a8bf0272555731aba775adf2046c.tar.bz2 linux-c8c93fe1c444a8bf0272555731aba775adf2046c.zip | |
perf annotate: Check return value of evsel__get_arch() properly
[ Upstream commit f1204e5846d22fb2fffbd1164eeb19535f306797 ]
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: 0669729eb0afb0cf ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf')
| -rw-r--r-- | tools/perf/util/annotate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 37ce43c4eb8f..cb8f191e19fd 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -974,7 +974,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) |
