File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -550,7 +550,6 @@ static void __init free_initrd(void)
550
550
initrd_end = 0 ;
551
551
}
552
552
553
- #ifdef CONFIG_BLK_DEV_RAM
554
553
#define BUF_SIZE 1024
555
554
static void __init clean_rootfs (void )
556
555
{
@@ -597,7 +596,6 @@ static void __init clean_rootfs(void)
597
596
ksys_close (fd );
598
597
kfree (buf );
599
598
}
600
- #endif
601
599
602
600
static int __init populate_rootfs (void )
603
601
{
@@ -640,8 +638,10 @@ static int __init populate_rootfs(void)
640
638
printk (KERN_INFO "Unpacking initramfs...\n" );
641
639
err = unpack_to_rootfs ((char * )initrd_start ,
642
640
initrd_end - initrd_start );
643
- if (err )
641
+ if (err ) {
644
642
printk (KERN_EMERG "Initramfs unpacking failed: %s\n" , err );
643
+ clean_rootfs ();
644
+ }
645
645
free_initrd ();
646
646
#endif
647
647
}
You can’t perform that action at this time.
0 commit comments