Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1490185 > unrolled thread

[PATCH 05/16] perf record: Fix error paths

Started byAdrian Hunter <adrian.hunter@intel.com>
First post2016-09-23 16:50 +0200
Last post2016-09-29 20:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 05/16] perf record: Fix error paths Adrian Hunter <adrian.hunter@intel.com> - 2016-09-23 16:50 +0200
    [tip:perf/core] perf record: Fix error paths tip-bot for Adrian Hunter <tipbot@zytor.com> - 2016-09-29 20:20 +0200

#1490185 — [PATCH 05/16] perf record: Fix error paths

FromAdrian Hunter <adrian.hunter@intel.com>
Date2016-09-23 16:50 +0200
Subject[PATCH 05/16] perf record: Fix error paths
Message-ID<skzXA-53e-33@gated-at.bofh.it>
Some error paths do not tidy-up. Fix that.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 tools/perf/builtin-record.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index b32a880ec473..962adcfc43a5 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1573,23 +1573,23 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
 	if (!rec->itr) {
 		rec->itr = auxtrace_record__init(rec->evlist, &err);
 		if (err)
-			return err;
+			goto out;
 	}
 
 	err = auxtrace_parse_snapshot_options(rec->itr, &rec->opts,
 					      rec->opts.auxtrace_snapshot_opts);
 	if (err)
-		return err;
+		goto out;
 
 	if (dry_run)
-		return 0;
+		goto out;
 
 	err = bpf__setup_stdout(rec->evlist);
 	if (err) {
 		bpf__strerror_setup_stdout(rec->evlist, err, errbuf, sizeof(errbuf));
 		pr_err("ERROR: Setup BPF stdout failed: %s\n",
 			 errbuf);
-		return err;
+		goto out;
 	}
 
 	err = -ENOMEM;
-- 
1.9.1

[toc] | [next] | [standalone]


#1493635 — [tip:perf/core] perf record: Fix error paths

Fromtip-bot for Adrian Hunter <tipbot@zytor.com>
Date2016-09-29 20:20 +0200
Subject[tip:perf/core] perf record: Fix error paths
Message-ID<smO65-7D0-9@gated-at.bofh.it>
In reply to#1490185
Commit-ID:  5c01ad60b8a23f8ff59b9a5a756f07ed08f0b6d1
Gitweb:     http://git.kernel.org/tip/5c01ad60b8a23f8ff59b9a5a756f07ed08f0b6d1
Author:     Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Fri, 23 Sep 2016 17:38:37 +0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 29 Sep 2016 11:17:01 -0300

perf record: Fix error paths

Some error paths do not tidy-up. Fix that.

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-6-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-record.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index b32a880..962adcf 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1573,23 +1573,23 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
 	if (!rec->itr) {
 		rec->itr = auxtrace_record__init(rec->evlist, &err);
 		if (err)
-			return err;
+			goto out;
 	}
 
 	err = auxtrace_parse_snapshot_options(rec->itr, &rec->opts,
 					      rec->opts.auxtrace_snapshot_opts);
 	if (err)
-		return err;
+		goto out;
 
 	if (dry_run)
-		return 0;
+		goto out;
 
 	err = bpf__setup_stdout(rec->evlist);
 	if (err) {
 		bpf__strerror_setup_stdout(rec->evlist, err, errbuf, sizeof(errbuf));
 		pr_err("ERROR: Setup BPF stdout failed: %s\n",
 			 errbuf);
-		return err;
+		goto out;
 	}
 
 	err = -ENOMEM;

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web