aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-events.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r--tools/perf/util/parse-events.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 1b284b8ad243..c47831c47220 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1,4 +1,5 @@
1#include <linux/hw_breakpoint.h> 1#include <linux/hw_breakpoint.h>
2#include <linux/err.h>
2#include "util.h" 3#include "util.h"
3#include "../perf.h" 4#include "../perf.h"
4#include "evlist.h" 5#include "evlist.h"
@@ -393,11 +394,10 @@ static int add_tracepoint(struct list_head *list, int *idx,
393 struct perf_evsel *evsel; 394 struct perf_evsel *evsel;
394 395
395 evsel = perf_evsel__newtp_idx(sys_name, evt_name, (*idx)++); 396 evsel = perf_evsel__newtp_idx(sys_name, evt_name, (*idx)++);
396 if (!evsel) 397 if (IS_ERR(evsel))
397 return -ENOMEM; 398 return PTR_ERR(evsel);
398 399
399 list_add_tail(&evsel->node, list); 400 list_add_tail(&evsel->node, list);
400
401 return 0; 401 return 0;
402} 402}
403 403