From: Davidlohr Bueso <dave@gnu.org>
To: Andrew Morton <akpm@linux-foundation.org>,
Tejun Heo <tj@kernel.org>, Namhyung Kim <namhyung@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] init: return proper error code in do_mounts_rd
Date: Thu, 20 Jan 2011 11:55:12 -0300 [thread overview]
Message-ID: <1295535312.2089.3.camel@offworld> (raw)
From: Davidlohr Bueso <dave@gnu.org>
In do_mounts_rd() if memory cannot be allocated, return -ENOMEM.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
init/do_mounts_rd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index 6e1ee69..fe9acb0 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -64,7 +64,7 @@ identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor)
buf = kmalloc(size, GFP_KERNEL);
if (!buf)
- return -1;
+ return -ENOMEM;
minixsb = (struct minix_super_block *) buf;
ext2sb = (struct ext2_super_block *) buf;
--
1.7.1
reply other threads:[~2011-01-20 14:55 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=1295535312.2089.3.camel@offworld \
--to=dave@gnu.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.com \
--cc=tj@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.