summaryrefslogtreecommitdiffstats
path: root/kernel/tools/perf/util/parse-events.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/tools/perf/util/parse-events.c')
-rw-r--r--kernel/tools/perf/util/parse-events.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/tools/perf/util/parse-events.c b/kernel/tools/perf/util/parse-events.c
index b48e87693..a35db828b 100644
--- a/kernel/tools/perf/util/parse-events.c
+++ b/kernel/tools/perf/util/parse-events.c
@@ -2101,11 +2101,11 @@ char *parse_events_formats_error_string(char *additional_terms)
/* valid terms */
if (additional_terms) {
- if (!asprintf(&str, "valid terms: %s,%s",
- additional_terms, static_terms))
+ if (asprintf(&str, "valid terms: %s,%s",
+ additional_terms, static_terms) < 0)
goto fail;
} else {
- if (!asprintf(&str, "valid terms: %s", static_terms))
+ if (asprintf(&str, "valid terms: %s", static_terms) < 0)
goto fail;
}
return str;