Skip to content

Commit

Permalink
init: return proper error code in do_mounts_rd()
Browse files Browse the repository at this point in the history
In do_mounts_rd() if memory cannot be allocated, return -ENOMEM.

Signed-off-by: Davidlohr Bueso <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Davidlohr Bueso authored and torvalds committed Mar 23, 2011
1 parent 1a530a6 commit ea611b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init/do_mounts_rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ea611b2

Please sign in to comment.