[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1504765607-23548-1-git-send-email-allen.lkml@gmail.com>
Date: Thu, 7 Sep 2017 11:56:47 +0530
From: Allen Pais <allen.lkml@...il.com>
To: linux-kernel@...r.kernel.org
Cc: x86@...nel.org, Allen Pais <allen.lkml@...il.com>
Subject: [PATCH 1/1] x86:mm:return -ENOMEM if kzalloc() fails
Currently on failure the value returned from kzalloc() is -1.
It should return -ENOMEM.
Signed-off-by: Allen Pais <allen.lkml@...il.com>
---
arch/x86/mm/kmmio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
index afc47f5..eb74b8a 100644
--- a/arch/x86/mm/kmmio.c
+++ b/arch/x86/mm/kmmio.c
@@ -385,7 +385,7 @@ static int add_kmmio_fault_page(unsigned long addr)
f = kzalloc(sizeof(*f), GFP_ATOMIC);
if (!f)
- return -1;
+ return -ENOMEM;
f->count = 1;
f->addr = addr;
--
2.7.4
Powered by blists - more mailing lists