From 0deaaafa5e17afebd21198beaa1b053211685488 Mon Sep 17 00:00:00 2001 From: Zhang Yanfei Date: Mon, 8 Jul 2013 15:59:57 -0700 Subject: 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 Change-Id: I8487b08f9b8557dde0c685b263ff066384b0750e (cherry picked from commit 5208b5405b8d725d5d74d4734d2ee8ba8896843a) --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mm/vmalloc.c') diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 9360e1ba5..750340dbb 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1649,7 +1649,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. -- cgit v1.2.3