From: Linus Torvalds Date: Sat, 6 May 2017 17:27:13 +0000 (-0700) Subject: initramfs: avoid "label at end of compound statement" error X-Git-Tag: v4.11.2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=602f8911c7dc9e54aaef1c3cd3ef31855dc270e3;p=thirdparty%2Fkernel%2Fstable.git initramfs: avoid "label at end of compound statement" error commit 394e4f5d5834b610ee032cceb20a1b1f45b01d28 upstream. Commit 17a9be317475 ("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 Fixes: 17a9be317475 ("initramfs: Always do fput() and load modules after rootfs populate") Cc: Al Viro Cc: Stafford Horne Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/init/initramfs.c b/init/initramfs.c index 3a68715973514..8daf7ac6c7e2c 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -642,6 +642,7 @@ static int __init populate_rootfs(void) free_initrd(); } done: + /* empty statement */; #else printk(KERN_INFO "Unpacking initramfs...\n"); err = unpack_to_rootfs((char *)initrd_start,