aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/swsusp.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/swsusp.c')
-rw-r--r--kernel/power/swsusp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c
index 0dfb24948907..acf79ac1cb6d 100644
--- a/kernel/power/swsusp.c
+++ b/kernel/power/swsusp.c
@@ -931,6 +931,10 @@ static int swsusp_alloc(void)
931 if (!enough_swap()) 931 if (!enough_swap())
932 return -ENOSPC; 932 return -ENOSPC;
933 933
934 if (MAX_PBES < nr_copy_pages / PBES_PER_PAGE +
935 !!(nr_copy_pages % PBES_PER_PAGE))
936 return -ENOSPC;
937
934 if (!(pagedir_save = alloc_pagedir(nr_copy_pages))) { 938 if (!(pagedir_save = alloc_pagedir(nr_copy_pages))) {
935 printk(KERN_ERR "suspend: Allocating pagedir failed.\n"); 939 printk(KERN_ERR "suspend: Allocating pagedir failed.\n");
936 return -ENOMEM; 940 return -ENOMEM;