[PATCH 1/1] WIP

From: Arnaldo Carvalho de Melo
Date: Wed Apr 03 2024 - 15:49:54 EST


Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/annotate.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index f316e0b65897957a..35235147b111e788 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -838,8 +838,10 @@ static int evsel__get_arch(struct evsel *evsel, struct arch **parch)
struct arch *arch;
int err;

- if (!arch_name)
+ if (!arch_name) {
+ *parch = NULL;
return errno;
+ }

*parch = arch = arch__find(arch_name);
if (arch == NULL) {
@@ -2266,7 +2268,7 @@ struct annotated_data_type *hist_entry__get_data_type(struct hist_entry *he)
{
struct map_symbol *ms = &he->ms;
struct evsel *evsel = hists_to_evsel(he->hists);
- struct arch *arch = NULL;
+ struct arch *arch;
struct disasm_line *dl;
struct annotated_insn_loc loc;
struct annotated_op_loc *op_loc;
--
2.44.0