aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/builtin-report.c3
-rw-r--r--tools/perf/util/sort.c5
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 6767f10615ea..b13a7e2f839e 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -473,7 +473,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
473 setup_sorting(report_usage, options); 473 setup_sorting(report_usage, options);
474 474
475 if (parent_pattern != default_parent_pattern) { 475 if (parent_pattern != default_parent_pattern) {
476 sort_dimension__add("parent"); 476 if (sort_dimension__add("parent") < 0)
477 return -1;
477 sort_parent.elide = 1; 478 sort_parent.elide = 1;
478 } else 479 } else
479 symbol_conf.exclude_other = false; 480 symbol_conf.exclude_other = false;
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 31329a1cd324..9d24d4b2c8fb 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -264,9 +264,8 @@ int sort_dimension__add(const char *tok)
264 char err[BUFSIZ]; 264 char err[BUFSIZ];
265 265
266 regerror(ret, &parent_regex, err, sizeof(err)); 266 regerror(ret, &parent_regex, err, sizeof(err));
267 fprintf(stderr, "Invalid regex: %s\n%s", 267 pr_err("Invalid regex: %s\n%s", parent_pattern, err);
268 parent_pattern, err); 268 return -EINVAL;
269 exit(-1);
270 } 269 }
271 sort__has_parent = 1; 270 sort__has_parent = 1;
272 } 271 }