X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=mm%2Fvmalloc.c;h=9eef486da9093469fa6a101b05be786a02f0ed14;hb=7b965e0884cee430ffe5dc81cdb117b9316b0549;hp=7dc6aa745166cf680092103195e725619c4ce633;hpb=239fd45938f9ddf64f120e0260c7b76eb73bd5a7;p=powerpc.git diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 7dc6aa7451..9eef486da9 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 } addr = ALIGN(start, align); size = PAGE_ALIGN(size); + if (unlikely(!size)) + return NULL; area = kmalloc_node(sizeof(*area), gfp_mask & GFP_LEVEL_MASK, node); if (unlikely(!area)) return NULL; - if (unlikely(!size)) - return NULL; - /* * We always allocate a guard page. */ @@ -700,7 +699,7 @@ finished: * that it is big enough to cover the vma. Will return failure if * that criteria isn't met. * - * Similar to remap_pfn_range (see mm/memory.c) + * Similar to remap_pfn_range() (see mm/memory.c) */ int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, unsigned long pgoff)