diff options
| author | Taeung Song <[email protected]> | 2014-09-24 01:33:37 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2014-09-26 15:32:58 +0000 |
| commit | 52e0283497ccb1e675d56c9499cc2cc5ec271094 (patch) | |
| tree | fa77ce32a71cb84c7372b5de67efa85fa04636f9 /tools/perf/builtin-script.c | |
| parent | perf tools: Fix perf record as non root with kptr_restrict == 1 (diff) | |
| download | kernel-52e0283497ccb1e675d56c9499cc2cc5ec271094.tar.gz kernel-52e0283497ccb1e675d56c9499cc2cc5ec271094.zip | |
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]>
Diffstat (limited to 'tools/perf/builtin-script.c')
| -rw-r--r-- | tools/perf/builtin-script.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 02dce9295e2c..b9b9e58a6c39 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -1744,7 +1744,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) session = perf_session__new(&file, false, &script.tool); if (session == NULL) - return -ENOMEM; + return -1; if (header || header_only) { perf_session__fprintf_info(session, stdout, show_full_info); |
