diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2016-09-23 10:38:43 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-09-29 10:17:04 -0400 |
commit | 4d34e10a9f9a38c611cac0deda8f91b064282747 (patch) | |
tree | 0e0c7aca2b0ef08884d90811fa3c9e5743425fa1 /tools | |
parent | fa8025c37454501a2df4a90ae84ff01f4aff8ba8 (diff) |
perf intel-pt: Fix missing error codes processing auxtrace_info
Fix 2 places where the err variable was not being set.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: http://lkml.kernel.org/r/1474641528-18776-12-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/intel-pt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index 77fbf02c8e41..96519e801e53 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c | |||
@@ -2138,11 +2138,13 @@ int intel_pt_process_auxtrace_info(union perf_event *event, | |||
2138 | pt->switch_evsel = intel_pt_find_sched_switch(session->evlist); | 2138 | pt->switch_evsel = intel_pt_find_sched_switch(session->evlist); |
2139 | if (!pt->switch_evsel) { | 2139 | if (!pt->switch_evsel) { |
2140 | pr_err("%s: missing sched_switch event\n", __func__); | 2140 | pr_err("%s: missing sched_switch event\n", __func__); |
2141 | err = -EINVAL; | ||
2141 | goto err_delete_thread; | 2142 | goto err_delete_thread; |
2142 | } | 2143 | } |
2143 | } else if (pt->have_sched_switch == 2 && | 2144 | } else if (pt->have_sched_switch == 2 && |
2144 | !intel_pt_find_switch(session->evlist)) { | 2145 | !intel_pt_find_switch(session->evlist)) { |
2145 | pr_err("%s: missing context_switch attribute flag\n", __func__); | 2146 | pr_err("%s: missing context_switch attribute flag\n", __func__); |
2147 | err = -EINVAL; | ||
2146 | goto err_delete_thread; | 2148 | goto err_delete_thread; |
2147 | } | 2149 | } |
2148 | 2150 | ||