]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mm/vmalloc.c: emit the failure message before return
authorZhang Yanfei <zhangyanfei@cn.fujitsu.com>
Mon, 8 Jul 2013 22:59:57 +0000 (15:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Jul 2013 17:33:21 +0000 (10:33 -0700)
Use goto to jump to the fail label to give a failure message before
returning NULL.  This makes the failure handling in this function
consistent.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmalloc.c

index 7ac2a1f8358a9c64a7bd544789dad4e98df59941..d81b9f70d92f896318e3204d8ea368cc9e08a264 100644 (file)
@@ -1642,7 +1642,7 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,
 
        addr = __vmalloc_area_node(area, gfp_mask, prot, node, caller);
        if (!addr)
-               return NULL;
+               goto fail;
 
        /*
         * In this function, newly allocated vm_struct has VM_UNLIST flag.