perf tools: Modify error code for when perf_session__new() fails
authorTaeung Song <treeze.taeung@gmail.com>
Wed, 24 Sep 2014 01:33:37 +0000 (10:33 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 26 Sep 2014 15:32:58 +0000 (12:32 -0300)
commit52e0283497ccb1e675d56c9499cc2cc5ec271094
treefa77ce32a71cb84c7372b5de67efa85fa04636f9
parenta5c2a4c9561cbbd374231bd341936dae716df9dd
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>
13 files changed:
tools/perf/builtin-annotate.c
tools/perf/builtin-diff.c
tools/perf/builtin-evlist.c
tools/perf/builtin-inject.c
tools/perf/builtin-kmem.c
tools/perf/builtin-kvm.c
tools/perf/builtin-lock.c
tools/perf/builtin-mem.c
tools/perf/builtin-report.c
tools/perf/builtin-script.c
tools/perf/builtin-timechart.c
tools/perf/builtin-top.c
tools/perf/builtin-trace.c