Skip to content

Commit 394e4f5

Browse files
committed
initramfs: avoid "label at end of compound statement" error
Commit 17a9be3 ("initramfs: Always do fput() and load modules after rootfs populate") introduced an error for the CONFIG_BLK_DEV_RAM=y case, because even though the code looks fine, the compiler really wants a statement after a label, or you'll get complaints: init/initramfs.c: In function 'populate_rootfs': init/initramfs.c:644:2: error: label at end of compound statement That commit moved the subsequent statements to outside the compound statement, leaving the label without any associated statements. Reported-by: Jörg Otte <jrg.otte@gmail.com> Fixes: 17a9be3 ("initramfs: Always do fput() and load modules after rootfs populate") Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Stafford Horne <shorne@gmail.com> Cc: stable@vger.kernel.org # if 17a9be3 gets backported Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 3ef2bc0 commit 394e4f5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

init/initramfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,7 @@ static int __init populate_rootfs(void)
642642
free_initrd();
643643
}
644644
done:
645+
/* empty statement */;
645646
#else
646647
printk(KERN_INFO "Unpacking initramfs...\n");
647648
err = unpack_to_rootfs((char *)initrd_start,

0 commit comments

Comments
 (0)