RISC-V: Free-up initrd in free_initrd_mem()
authorAnup Patel <anup.patel@wdc.com>
Wed, 13 Feb 2019 11:13:01 +0000 (16:43 +0530)
committerAnup Patel <anup@brainfault.org>
Thu, 21 Feb 2019 05:56:50 +0000 (11:26 +0530)
We should free-up initrd memory in free_initrd_mem() instead
of doing nothing.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
arch/riscv/mm/init.c

index 9e7b3ee..b379a75 100644 (file)
@@ -94,8 +94,9 @@ disable:
        initrd_end = 0;
 }
 
-void free_initrd_mem(unsigned long start, unsigned long end)
+void __init free_initrd_mem(unsigned long start, unsigned long end)
 {
+       free_reserved_area((void *)start, (void *)end, -1, "initrd");
 }
 #endif /* CONFIG_BLK_DEV_INITRD */