diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmalloc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 7dc6aa745166..86897ee792d6 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -181,14 +181,13 @@ static struct vm_struct *__get_vm_area_node(unsigned long size, unsigned long fl | |||
181 | } | 181 | } |
182 | addr = ALIGN(start, align); | 182 | addr = ALIGN(start, align); |
183 | size = PAGE_ALIGN(size); | 183 | size = PAGE_ALIGN(size); |
184 | if (unlikely(!size)) | ||
185 | return NULL; | ||
184 | 186 | ||
185 | area = kmalloc_node(sizeof(*area), gfp_mask & GFP_LEVEL_MASK, node); | 187 | area = kmalloc_node(sizeof(*area), gfp_mask & GFP_LEVEL_MASK, node); |
186 | if (unlikely(!area)) | 188 | if (unlikely(!area)) |
187 | return NULL; | 189 | return NULL; |
188 | 190 | ||
189 | if (unlikely(!size)) | ||
190 | return NULL; | ||
191 | |||
192 | /* | 191 | /* |
193 | * We always allocate a guard page. | 192 | * We always allocate a guard page. |
194 | */ | 193 | */ |