summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-annotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r--tools/perf/builtin-annotate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 553c651fa0a2..8db8fc9bddef 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -40,6 +40,7 @@
40#include <dlfcn.h> 40#include <dlfcn.h>
41#include <errno.h> 41#include <errno.h>
42#include <linux/bitmap.h> 42#include <linux/bitmap.h>
43#include <linux/err.h>
43 44
44struct perf_annotate { 45struct perf_annotate {
45 struct perf_tool tool; 46 struct perf_tool tool;
@@ -584,8 +585,8 @@ int cmd_annotate(int argc, const char **argv)
584 data.path = input_name; 585 data.path = input_name;
585 586
586 annotate.session = perf_session__new(&data, false, &annotate.tool); 587 annotate.session = perf_session__new(&data, false, &annotate.tool);
587 if (annotate.session == NULL) 588 if (IS_ERR(annotate.session))
588 return -1; 589 return PTR_ERR(annotate.session);
589 590
590 annotate.has_br_stack = perf_header__has_feat(&annotate.session->header, 591 annotate.has_br_stack = perf_header__has_feat(&annotate.session->header,
591 HEADER_BRANCH_STACK); 592 HEADER_BRANCH_STACK);