* [PATCH -mm] mm, vmalloc: Prompt the failure message before return
@ 2013-06-08 8:40 ` Zhang Yanfei
0 siblings, 0 replies; 2+ messages in thread
From: Zhang Yanfei @ 2013-06-08 8:40 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel@vger.kernel.org, Linux MM
From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
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>
---
mm/vmalloc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 91a1047..9a0d711 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -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.
--
1.7.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH -mm] mm, vmalloc: Prompt the failure message before return
@ 2013-06-08 8:40 ` Zhang Yanfei
0 siblings, 0 replies; 2+ messages in thread
From: Zhang Yanfei @ 2013-06-08 8:40 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel@vger.kernel.org, Linux MM
From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
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>
---
mm/vmalloc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 91a1047..9a0d711 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -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.
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-08 8:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-08 8:40 [PATCH -mm] mm, vmalloc: Prompt the failure message before return Zhang Yanfei
2013-06-08 8:40 ` Zhang Yanfei
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.