From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx192.postini.com [74.125.245.192]) by kanga.kvack.org (Postfix) with SMTP id DC8F16B0031 for ; Sat, 8 Jun 2013 04:40:19 -0400 (EDT) Received: by mail-pb0-f42.google.com with SMTP id un1so1403647pbc.15 for ; Sat, 08 Jun 2013 01:40:19 -0700 (PDT) Message-ID: <51B2EDE4.1070109@gmail.com> Date: Sat, 08 Jun 2013 16:40:04 +0800 From: Zhang Yanfei MIME-Version: 1.0 Subject: [PATCH -mm] mm, vmalloc: Prompt the failure message before return Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: "linux-kernel@vger.kernel.org" , Linux MM From: Zhang Yanfei 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 --- 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: email@kvack.org