diff options
author | Taeung Song <treeze.taeung@gmail.com> | 2014-09-23 21:33:37 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-09-26 11:32:58 -0400 |
commit | 52e0283497ccb1e675d56c9499cc2cc5ec271094 (patch) | |
tree | fa77ce32a71cb84c7372b5de67efa85fa04636f9 /tools/perf/builtin-annotate.c | |
parent | a5c2a4c9561cbbd374231bd341936dae716df9dd (diff) |
perf tools: Modify error code for when perf_session__new() fails
Because perf_session__new() can fail for more reasons than just ENOMEM,
modify error code(ENOMEM or EINVAL) to -1.
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1411522417-9917-1-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r-- | tools/perf/builtin-annotate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index d4da6929597f..be5939418425 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
@@ -340,7 +340,7 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused) | |||
340 | 340 | ||
341 | annotate.session = perf_session__new(&file, false, &annotate.tool); | 341 | annotate.session = perf_session__new(&file, false, &annotate.tool); |
342 | if (annotate.session == NULL) | 342 | if (annotate.session == NULL) |
343 | return -ENOMEM; | 343 | return -1; |
344 | 344 | ||
345 | symbol_conf.priv_size = sizeof(struct annotation); | 345 | symbol_conf.priv_size = sizeof(struct annotation); |
346 | symbol_conf.try_vmlinux_path = true; | 346 | symbol_conf.try_vmlinux_path = true; |