Skip to content

Commit 46c001a

Browse files
Zhang Yanfeitorvalds
authored andcommitted
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>
1 parent b8e748b commit 46c001a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/vmalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,7 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,
16421642

16431643
addr = __vmalloc_area_node(area, gfp_mask, prot, node, caller);
16441644
if (!addr)
1645-
return NULL;
1645+
goto fail;
16461646

16471647
/*
16481648
* In this function, newly allocated vm_struct has VM_UNLIST flag.

0 commit comments

Comments
 (0)