[PATCH v6 5/5] RISC-V: Free-up initrd in free_initrd_mem()

From: Anup Patel
Date: Wed Feb 13 2019 - 06:54:07 EST


We should free-up initrd memory in free_initrd_mem() instead
of doing nothing.

Signed-off-by: Anup Patel <anup.patel@xxxxxxx>
---
arch/riscv/mm/init.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index b1167a6f5a92..aabf1869c54b 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -94,8 +94,9 @@ static void __init setup_initrd(void)
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 */

--
2.17.1