提交 ea611b26 编写于 作者: D Davidlohr Bueso 提交者: Linus Torvalds

init: return proper error code in do_mounts_rd()

In do_mounts_rd() if memory cannot be allocated, return -ENOMEM.
Signed-off-by: NDavidlohr Bueso <dave@gnu.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 1a530a6f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册