Skip to contentSkip to conversation

mm, vmalloc: Prompt the failure message before return

PATCH New Zhang Yanfei 1 participant 1 message Jun 8, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm, vmalloc: Prompt the failure message before return

From: Zhang Yanfei <[email protected]>

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.

---
 mm/vmalloc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
mm/vmalloc.c +1 -1
index 91a1047..9a0d711 100644
@@ -1664,7 +1664,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.
Signature · 7 lines
1.7.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>