diff options
Diffstat (limited to 'tools/perf/util/data-convert-bt.c')
-rw-r--r-- | tools/perf/util/data-convert-bt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c index 7123f4de32cc..4e6cbc99f08e 100644 --- a/tools/perf/util/data-convert-bt.c +++ b/tools/perf/util/data-convert-bt.c @@ -1473,7 +1473,7 @@ int bt_convert__perf2ctf(const char *input, const char *path, }, }; struct ctf_writer *cw = &c.writer; - int err = -1; + int err; if (opts->all) { c.tool.comm = process_comm_event; @@ -1481,12 +1481,15 @@ int bt_convert__perf2ctf(const char *input, const char *path, c.tool.fork = process_fork_event; } - perf_config(convert__config, &c); + err = perf_config(convert__config, &c); + if (err) + return err; /* CTF writer */ if (ctf_writer__init(cw, path)) return -1; + err = -1; /* perf.data session */ session = perf_session__new(&file, 0, &c.tool); if (!session) |