summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorZhang Yanfei <zhangyanfei@cn.fujitsu.com>2013-07-09 00:59:57 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-09 19:33:21 +0200
commit46c001a2753f47ffa621131baa3409e636515347 (patch)
treeb7e7f11f58f6d8ffacba6c36c09700a2d98632e9 /mm
parentmm/vmalloc.c: remove alloc_map from vmap_block (diff)
downloadlinux-46c001a2753f47ffa621131baa3409e636515347.tar.xz
linux-46c001a2753f47ffa621131baa3409e636515347.zip
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 <zhangyanfei@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/vmalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 7ac2a1f8358a..d81b9f70d92f 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.