drivers/firmware/memmap.c: modify memblock_alloc to memblock_alloc_nopanic

memblock_alloc() never returns NULL because panic never returns.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: huang.zijiang <[email protected]>
Acked-by: Mike Rapoport <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Yi Wang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
huang.zijiang 2019-01-03 15:26:55 -08:00 • committed by Linus Torvalds
commit 05391772a7

View file

@ -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;