aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 5411be4cfd77..2a85205ba01a 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -327,7 +327,10 @@ try_again:
327 exit(-1); 327 exit(-1);
328 } 328 }
329 329
330 perf_header_attr__add_id(h_attr, read_data.id); 330 if (perf_header_attr__add_id(h_attr, read_data.id) < 0) {
331 pr_warning("Not enough memory to add id\n");
332 exit(-1);
333 }
331 334
332 assert(fd[nr_cpu][counter] >= 0); 335 assert(fd[nr_cpu][counter] >= 0);
333 fcntl(fd[nr_cpu][counter], F_SETFL, O_NONBLOCK); 336 fcntl(fd[nr_cpu][counter], F_SETFL, O_NONBLOCK);