]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - tools/perf/util/callchain.c
Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[karo-tx-linux.git] / tools / perf / util / callchain.c
index 81fc29ac798facf789712d81147eacda0c01552d..b4204b43ed58a83c9530ae3b75df4c01004b442e 100644 (file)
@@ -621,14 +621,19 @@ enum match_result {
 static enum match_result match_chain_srcline(struct callchain_cursor_node *node,
                                             struct callchain_list *cnode)
 {
-       char *left = get_srcline(cnode->ms.map->dso,
+       char *left = NULL;
+       char *right = NULL;
+       enum match_result ret = MATCH_EQ;
+       int cmp;
+
+       if (cnode->ms.map)
+               left = get_srcline(cnode->ms.map->dso,
                                 map__rip_2objdump(cnode->ms.map, cnode->ip),
                                 cnode->ms.sym, true, false);
-       char *right = get_srcline(node->map->dso,
+       if (node->map)
+               right = get_srcline(node->map->dso,
                                  map__rip_2objdump(node->map, node->ip),
                                  node->sym, true, false);
-       enum match_result ret = MATCH_EQ;
-       int cmp;
 
        if (left && right)
                cmp = strcmp(left, right);