From 52e0283497ccb1e675d56c9499cc2cc5ec271094 Mon Sep 17 00:00:00 2001 From: Taeung Song Date: Wed, 24 Sep 2014 10:33:37 +0900 Subject: 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 Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1411522417-9917-1-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-timechart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/perf/builtin-timechart.c') diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 48eea6cd2f5..35b425b6293 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c @@ -1605,7 +1605,7 @@ static int __cmd_timechart(struct timechart *tchart, const char *output_name) int ret = -EINVAL; if (session == NULL) - return -ENOMEM; + return -1; symbol__init(&session->header.env); -- cgit v1.2.3-70-g09d2