Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

identify_ramdisk_image(): correct typo about return value in comment

identify_ramdisk_image() returns 0 (not -1) if a gzipped ramdisk is found:

if (buf[0] == 037 && ((buf[1] == 0213) || (buf[1] == 0236))) {
printk(KERN_NOTICE
"RAMDISK: Compressed image found at block %d\n",
start_block);
nblocks = 0;
^^^^^^^^^^^
goto done;
}

...

done:
sys_lseek(fd, start_block * BLOCK_SIZE, 0);
kfree(buf);
return nblocks;
^^^^^^^^^^^^^^

Hence correct the typo in the comment, which has existed since the
addition of compressed ramdisk support in 1.3.48.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Geert Uytterhoeven and committed by
Linus Torvalds
93fd85d0 2e0eb731

+1 -1
+1 -1
init/do_mounts_rd.c
··· 71 71 sys_read(fd, buf, size); 72 72 73 73 /* 74 - * If it matches the gzip magic numbers, return -1 74 + * If it matches the gzip magic numbers, return 0 75 75 */ 76 76 if (buf[0] == 037 && ((buf[1] == 0213) || (buf[1] == 0236))) { 77 77 printk(KERN_NOTICE