aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/evlist.c')
-rw-r--r--tools/perf/util/evlist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 963d63dde457..fa1837088ca8 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -563,6 +563,8 @@ int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages,
563 /* 512 kiB: default amount of unprivileged mlocked memory */ 563 /* 512 kiB: default amount of unprivileged mlocked memory */
564 if (pages == UINT_MAX) 564 if (pages == UINT_MAX)
565 pages = (512 * 1024) / page_size; 565 pages = (512 * 1024) / page_size;
566 else if (!is_power_of_2(pages))
567 return -EINVAL;
566 568
567 mask = pages * page_size - 1; 569 mask = pages * page_size - 1;
568 570