mirror of
https://github.com/torvalds/linux.git
synced 2026-04-25 18:12:26 -04:00
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>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
1da1d60774
commit
806731a946
@@ -638,7 +638,7 @@ static int do_test_code_reading(bool try_kcore)
|
||||
|
||||
str = do_determine_event(excl_kernel);
|
||||
pr_debug("Parsing event '%s'\n", str);
|
||||
ret = parse_events(evlist, str, NULL);
|
||||
ret = parse_event(evlist, str);
|
||||
if (ret < 0) {
|
||||
pr_debug("parse_events failed\n");
|
||||
goto out_put;
|
||||
|
||||
Reference in New Issue
Block a user