diff options
| author | Mark Brown <[email protected]> | 2023-07-23 22:33:05 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2023-07-23 22:33:05 +0000 |
| commit | de1b43a57aff8b1808bbfe0402932f9e373d1172 (patch) | |
| tree | 699c828946223aab18a0aab5175e6902a8ce2e42 /tools/perf/util/parse-events.c | |
| parent | ASoC: wm8960: Add DAC filter characteristics selection (diff) | |
| parent | Linux 6.5-rc3 (diff) | |
| download | kernel-de1b43a57aff8b1808bbfe0402932f9e373d1172.tar.gz kernel-de1b43a57aff8b1808bbfe0402932f9e373d1172.zip | |
ASoC: Merge up fixes from mainline
There's several things here that will really help my CI.
Diffstat (limited to 'tools/perf/util/parse-events.c')
| -rw-r--r-- | tools/perf/util/parse-events.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 5dcfbf316bf6..acde097e327c 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -1216,6 +1216,14 @@ static int config_term_pmu(struct perf_event_attr *attr, if (term->type_term == PARSE_EVENTS__TERM_TYPE_LEGACY_CACHE) { const struct perf_pmu *pmu = perf_pmus__find_by_type(attr->type); + if (!pmu) { + char *err_str; + + if (asprintf(&err_str, "Failed to find PMU for type %d", attr->type) >= 0) + parse_events_error__handle(err, term->err_term, + err_str, /*help=*/NULL); + return -EINVAL; + } if (perf_pmu__supports_legacy_cache(pmu)) { attr->type = PERF_TYPE_HW_CACHE; return parse_events__decode_legacy_cache(term->config, pmu->type, |
