summaryrefslogtreecommitdiff
path: root/tools/perf/util/record.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2022-08-09 11:07:02 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-08-10 20:30:09 +0300
commit806731a9465b42aaf887cbaf8bfee7eccc9417de (patch)
tree7a1cf71e17d762a0f7dffd5c473b999d20147ff6 /tools/perf/util/record.c
parent1da1d60774014137d776d0400fdf2f1779d8d4d5 (diff)
downloadlinux-806731a9465b42aaf887cbaf8bfee7eccc9417de.tar.xz
perf tools: Do not pass NULL to parse_events()
Many cases do not use the extra error information provided by parse_events and instead pass NULL as the struct parse_events_error pointer. Add a wrapper for those cases so that the pointer is never NULL. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20220809080702.6921-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/record.c')
-rw-r--r--tools/perf/util/record.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/record.c b/tools/perf/util/record.c
index b529636ab3ea..7b58f6c7c69d 100644
--- a/tools/perf/util/record.c
+++ b/tools/perf/util/record.c
@@ -238,7 +238,7 @@ bool evlist__can_select_event(struct evlist *evlist, const char *str)
if (!temp_evlist)
return false;
- err = parse_events(temp_evlist, str, NULL);
+ err = parse_event(temp_evlist, str);
if (err)
goto out_delete;