Commit 5c01ad60 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf record: Fix error paths

Some error paths do not tidy-up. Fix that.
Signed-off-by: default avatarAdrian 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-6-git-send-email-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 394c01ed
...@@ -1573,23 +1573,23 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused) ...@@ -1573,23 +1573,23 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
if (!rec->itr) { if (!rec->itr) {
rec->itr = auxtrace_record__init(rec->evlist, &err); rec->itr = auxtrace_record__init(rec->evlist, &err);
if (err) if (err)
return err; goto out;
} }
err = auxtrace_parse_snapshot_options(rec->itr, &rec->opts, err = auxtrace_parse_snapshot_options(rec->itr, &rec->opts,
rec->opts.auxtrace_snapshot_opts); rec->opts.auxtrace_snapshot_opts);
if (err) if (err)
return err; goto out;
if (dry_run) if (dry_run)
return 0; goto out;
err = bpf__setup_stdout(rec->evlist); err = bpf__setup_stdout(rec->evlist);
if (err) { if (err) {
bpf__strerror_setup_stdout(rec->evlist, err, errbuf, sizeof(errbuf)); bpf__strerror_setup_stdout(rec->evlist, err, errbuf, sizeof(errbuf));
pr_err("ERROR: Setup BPF stdout failed: %s\n", pr_err("ERROR: Setup BPF stdout failed: %s\n",
errbuf); errbuf);
return err; goto out;
} }
err = -ENOMEM; err = -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment