[PATCH] x86: return proper error code
From: Davidlohr Bueso
Date: Fri Sep 24 2010 - 13:19:16 EST
x86: return -ENOMEM instead of -1 when returning on memory allocation errors in add_kmmio_fault_page()
Signed-off-by: Davidlohr Bueso <dave@xxxxxxx>
---
arch/x86/mm/kmmio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
index e5d5e2c..36a4347 100644
--- a/arch/x86/mm/kmmio.c
+++ b/arch/x86/mm/kmmio.c
@@ -370,7 +370,7 @@ static int add_kmmio_fault_page(unsigned long page)
f = kzalloc(sizeof(*f), GFP_ATOMIC);
if (!f)
- return -1;
+ return -ENOMEM;
f->count = 1;
f->page = page;
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/