Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Zhang Yanfei and committed by
Linus Torvalds
46c001a2 b8e748b6

+1 -1
+1 -1
mm/vmalloc.c
··· 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.