* [PATCH] init: return proper error code in do_mounts_rd
@ 2011-01-20 14:55 Davidlohr Bueso
0 siblings, 0 replies; only message in thread
From: Davidlohr Bueso @ 2011-01-20 14:55 UTC (permalink / raw)
To: Andrew Morton, Tejun Heo, Namhyung Kim; +Cc: LKML
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-20 14:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-20 14:55 [PATCH] init: return proper error code in do_mounts_rd Davidlohr Bueso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox