From: Zhang Yanfei Date: Mon, 8 Jul 2013 22:59:57 +0000 (-0700) Subject: mm/vmalloc.c: emit the failure message before return X-Git-Tag: v3.11-rc1~67^2~97 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46c001a2753f47ffa621131baa3409e636515347;p=profile%2Fivi%2Fkernel-x86-ivi.git mm/vmalloc.c: emit the failure message before return 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 7ac2a1f..d81b9f7 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -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.