[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1285875794.2180.0.camel@cowboy>
Date: Thu, 30 Sep 2010 15:43:14 -0400
From: Davidlohr Bueso <dave@....org>
To: tglx@...utronix.de, mingo@...hat.com, hpa@...or.com
Cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.org
Subject: [RESEND PATCH] x86: return proper error code
x86: return -ENOMEM instead of -1 when returning on memory allocation errors in add_kmmio_fault_page()
Signed-off-by: Davidlohr Bueso <dave@....org>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists