public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: return proper error code
@ 2010-09-24 17:19 Davidlohr Bueso
  0 siblings, 0 replies; only message in thread
From: Davidlohr Bueso @ 2010-09-24 17:19 UTC (permalink / raw)
  To: tglx, mingo, hpa; +Cc: LKML, x86

x86: return -ENOMEM instead of -1 when returning on memory allocation errors in add_kmmio_fault_page()

Signed-off-by: Davidlohr Bueso <dave@gnu.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




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-24 17:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-24 17:19 [PATCH] x86: return proper error code Davidlohr Bueso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox