From: Davidlohr Bueso <dave@gnu.org>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com
Cc: LKML <linux-kernel@vger.kernel.org>, x86@kernel.org
Subject: [PATCH] x86: return proper error code
Date: Fri, 24 Sep 2010 13:19:08 -0400 [thread overview]
Message-ID: <1285348748.3031.5.camel@cowboy> (raw)
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
reply other threads:[~2010-09-24 17:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1285348748.3031.5.camel@cowboy \
--to=dave@gnu.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox