Skip to content

Commit

Permalink
mm/vmalloc.c: emit the failure message before return
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Zhang Yanfei authored and torvalds committed Jul 9, 2013
1 parent b8e748b commit 46c001a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1642,7 +1642,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.
Expand Down

0 comments on commit 46c001a

Please sign in to comment.