aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/intel-pt.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/intel-pt.c')
-rw-r--r--tools/perf/util/intel-pt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
index 441e681a46a0..a272b35f6c5a 100644
--- a/tools/perf/util/intel-pt.c
+++ b/tools/perf/util/intel-pt.c
@@ -442,8 +442,7 @@ static int intel_pt_walk_next_insn(struct intel_pt_insn *intel_pt_insn,
442 } 442 }
443 443
444 while (1) { 444 while (1) {
445 thread__find_map(thread, cpumode, *ip, &al); 445 if (!thread__find_map(thread, cpumode, *ip, &al) || !al.map->dso)
446 if (!al.map || !al.map->dso)
447 return -EINVAL; 446 return -EINVAL;
448 447
449 if (al.map->dso->data.status == DSO_DATA_STATUS_ERROR && 448 if (al.map->dso->data.status == DSO_DATA_STATUS_ERROR &&
@@ -596,8 +595,7 @@ static int __intel_pt_pgd_ip(uint64_t ip, void *data)
596 if (!thread) 595 if (!thread)
597 return -EINVAL; 596 return -EINVAL;
598 597
599 thread__find_map(thread, cpumode, ip, &al); 598 if (!thread__find_map(thread, cpumode, ip, &al) || !al.map->dso)
600 if (!al.map || !al.map->dso)
601 return -EINVAL; 599 return -EINVAL;
602 600
603 offset = al.map->map_ip(al.map, ip); 601 offset = al.map->map_ip(al.map, ip);