diff options
Diffstat (limited to 'tools/perf/util/libbfd.c')
| -rw-r--r-- | tools/perf/util/libbfd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/libbfd.c b/tools/perf/util/libbfd.c index a907d7c1ac94..992e2c2a7198 100644 --- a/tools/perf/util/libbfd.c +++ b/tools/perf/util/libbfd.c @@ -288,7 +288,7 @@ int libbfd__addr2line(const char *dso_name, u64 addr, if (node && inline_list__append_dso_a2l(dso, node, sym)) { inline_node__clear_frames(node); - ret = 0; + ret = -ENOMEM; goto out; } @@ -302,7 +302,7 @@ int libbfd__addr2line(const char *dso_name, u64 addr, if (node != NULL) { if (inline_list__append_dso_a2l(dso, node, sym)) { inline_node__clear_frames(node); - ret = 0; + ret = -ENOMEM; goto out; } } @@ -312,7 +312,7 @@ int libbfd__addr2line(const char *dso_name, u64 addr, if (file) { *file = a2l->filename ? strdup(a2l->filename) : NULL; if (!*file) { - /* Leave ret as 0 so that another addr2line is tried. */ + ret = a2l->filename ? -ENOMEM : 0; goto out; } } @@ -463,7 +463,7 @@ int dso__load_bfd_symbols(struct dso *dso, const char *debugfile) symbols__fixup_duplicate(dso__symbols(dso)); dso__set_adjust_symbols(dso, true); - err = 0; + err = dso__has_symbols(dso); out_free: free(symbols); out_close: |
