diff options
-rw-r--r-- | init/initramfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index fca899622937..7cea802d00ef 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -550,7 +550,6 @@ skip: initrd_end = 0; } -#ifdef CONFIG_BLK_DEV_RAM #define BUF_SIZE 1024 static void __init clean_rootfs(void) { @@ -597,7 +596,6 @@ static void __init clean_rootfs(void) ksys_close(fd); kfree(buf); } -#endif static int __init populate_rootfs(void) { @@ -640,8 +638,10 @@ static int __init populate_rootfs(void) printk(KERN_INFO "Unpacking initramfs...\n"); err = unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start); - if (err) + if (err) { printk(KERN_EMERG "Initramfs unpacking failed: %s\n", err); + clean_rootfs(); + } free_initrd(); #endif } |