diff --git a/init/initramfs.c b/init/initramfs.c index cd5fb00fcb549645a646bef2c3d72132cb2550cd..dab8d63459f63958bc303aed7c398b61e418b68e 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -524,7 +524,7 @@ static void __init free_initrd(void) unsigned long crashk_start = (unsigned long)__va(crashk_res.start); unsigned long crashk_end = (unsigned long)__va(crashk_res.end); #endif - if (do_retain_initrd) + if (do_retain_initrd || !initrd_start) goto skip; #ifdef CONFIG_KEXEC_CORE