[PATCH] firmware/memmap:Modify memblock_alloc to memblock_alloc_nopanic

From: huang.zijiang
Date: Mon Dec 24 2018 - 03:38:29 EST


From: "huang.zijiang" <huang.zijiang@xxxxxxxxxx>

memblock_alloc never returns NULL because panic never returns

Signed-off-by: huang.zijiang <huang.zijiang@xxxxxxxxxx>
---
drivers/firmware/memmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/memmap.c b/drivers/firmware/memmap.c
index d168c87..ec4fd25 100644
--- a/drivers/firmware/memmap.c
+++ b/drivers/firmware/memmap.c
@@ -333,7 +333,7 @@ int __init firmware_map_add_early(u64 start, u64 end, const char *type)
{
struct firmware_map_entry *entry;

- entry = memblock_alloc(sizeof(struct firmware_map_entry),
+ entry = memblock_alloc_nopanic(sizeof(struct firmware_map_entry),
SMP_CACHE_BYTES);
if (WARN_ON(!entry))
return -ENOMEM;
--
1.8.3.1