]> git.baikalelectronics.ru Git - kernel.git/commit
initramfs: avoid "label at end of compound statement" error
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 May 2017 17:27:13 +0000 (10:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 May 2017 17:27:13 +0000 (10:27 -0700)
commit765cf7d99cadc30013ef026474687b96dc83648e
treefcd316bf688c9b47d7c5e02a03630494c32982e9
parent54f7b07d2227466b9625ca4bc0d13c82528434fb
initramfs: avoid "label at end of compound statement" error

Commit 89bbe7835960 ("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: 89bbe7835960 ("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 89bbe7835960 gets backported
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
init/initramfs.c