aboutsummaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorZhang Yanfei <zhangyanfei@cn.fujitsu.com>2013-07-08 15:59:57 -0700
committerMoyster <oysterized@gmail.com>2019-05-02 20:58:34 +0200
commit0deaaafa5e17afebd21198beaa1b053211685488 (patch)
treed92473c46465fb931ea4eded4a98e0691bfb5a25 /mm
parentd4d4571d7f11d5435605c09e9c3ce6d14f11a078 (diff)
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> Change-Id: I8487b08f9b8557dde0c685b263ff066384b0750e (cherry picked from commit 5208b5405b8d725d5d74d4734d2ee8ba8896843a)
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 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.