Commit 46c001a2753f47ffa621131baa3409e636515347

Authored by Zhang Yanfei
Committed by Linus Torvalds
1 parent b8e748b6c3

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -1642,7 +1642,7 @@
1642 1642  
1643 1643 addr = __vmalloc_area_node(area, gfp_mask, prot, node, caller);
1644 1644 if (!addr)
1645   - return NULL;
  1645 + goto fail;
1646 1646  
1647 1647 /*
1648 1648 * In this function, newly allocated vm_struct has VM_UNLIST flag.