summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-sched.c')
-rw-r--r--tools/perf/builtin-sched.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index f0b828c201cc..079e67a36904 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -40,6 +40,7 @@
40#include <api/fs/fs.h> 40#include <api/fs/fs.h>
41#include <perf/cpumap.h> 41#include <perf/cpumap.h>
42#include <linux/time64.h> 42#include <linux/time64.h>
43#include <linux/err.h>
43 44
44#include <linux/ctype.h> 45#include <linux/ctype.h>
45 46
@@ -1797,9 +1798,9 @@ static int perf_sched__read_events(struct perf_sched *sched)
1797 int rc = -1; 1798 int rc = -1;
1798 1799
1799 session = perf_session__new(&data, false, &sched->tool); 1800 session = perf_session__new(&data, false, &sched->tool);
1800 if (session == NULL) { 1801 if (IS_ERR(session)) {
1801 pr_debug("No Memory for session\n"); 1802 pr_debug("Error creating perf session");
1802 return -1; 1803 return PTR_ERR(session);
1803 } 1804 }
1804 1805
1805 symbol__init(&session->header.env); 1806 symbol__init(&session->header.env);
@@ -2989,8 +2990,8 @@ static int perf_sched__timehist(struct perf_sched *sched)
2989 symbol_conf.use_callchain = sched->show_callchain; 2990 symbol_conf.use_callchain = sched->show_callchain;
2990 2991
2991 session = perf_session__new(&data, false, &sched->tool); 2992 session = perf_session__new(&data, false, &sched->tool);
2992 if (session == NULL) 2993 if (IS_ERR(session))
2993 return -ENOMEM; 2994 return PTR_ERR(session);
2994 2995
2995 evlist = session->evlist; 2996 evlist = session->evlist;
2996 2997