[PATCH -mm] mm, vmalloc: Prompt the failure message before return

From: Zhang Yanfei
Date: Sat Jun 08 2013 - 04:40:28 EST

From: Zhang Yanfei <zhangyanfei@xxxxxxxxxxxxxx>

Use goto to jump to the fail label to give a failure message before
returning NULL. This makes the failure handling in this function

Signed-off-by: Zhang Yanfei <zhangyanfei@xxxxxxxxxxxxxx>
mm/vmalloc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 91a1047..9a0d711 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1664,7 +1664,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.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/