commit | 52e0283497ccb1e675d56c9499cc2cc5ec271094 | [log] [tgz] |
---|---|---|
author | Taeung Song <[email protected]> | Wed Sep 24 10:33:37 2014 +0900 |
committer | Arnaldo Carvalho de Melo <[email protected]> | Fri Sep 26 12:32:58 2014 -0300 |
tree | fa77ce32a71cb84c7372b5de67efa85fa04636f9 | |
parent | a5c2a4c9561cbbd374231bd341936dae716df9dd [diff] [blame] |
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 <[email protected]> Acked-by: Jiri Olsa <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index d4da692..be59394 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c
@@ -340,7 +340,7 @@ annotate.session = perf_session__new(&file, false, &annotate.tool); if (annotate.session == NULL) - return -ENOMEM; + return -1; symbol_conf.priv_size = sizeof(struct annotation); symbol_conf.try_vmlinux_path = true;