From 96fdf2ebe27e293eedf3d77c3f87da41914b285d Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 6 May 2017 10:27:13 -0700 Subject: initramfs: avoid "label at end of compound statement" error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: stable@vger.kernel.org # if 17a9be317475 gets backported Signed-off-by: Linus Torvalds Signed-off-by: Joe Maples --- init/initramfs.c | 1 + 1 file changed, 1 insertion(+) (limited to 'init') diff --git a/init/initramfs.c b/init/initramfs.c index eb2275e11..478db19f5 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -628,6 +628,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, -- cgit v1.2.3