From: Davidlohr Bueso Date: Tue, 22 Mar 2011 23:34:49 +0000 (-0700) Subject: init: return proper error code in do_mounts_rd() X-Git-Tag: firefly_0821_release~7613^2~1952 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ea611b2699b51a762ef03f805f9616e65d98f68e;p=firefly-linux-kernel-4.4.55.git init: return proper error code in do_mounts_rd() In do_mounts_rd() if memory cannot be allocated, return -ENOMEM. Signed-off-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index 6e1ee6987c78..fe9acb0ae480 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;