mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RESEND PATCH] x86: return proper error code
@ 2010-09-30 19:43 Davidlohr Bueso
  2010-09-30 19:49 ` Pekka Enberg
  0 siblings, 1 reply; 3+ messages in thread
From: Davidlohr Bueso @ 2010-09-30 19:43 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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-01 14:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-30 19:43 [RESEND PATCH] x86: return proper error code Davidlohr Bueso
2010-09-30 19:49 ` Pekka Enberg
2010-10-01 14:28   ` Pekka Paalanen

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

all inboxes | Powered by JetHome®