On Tue, Jan 21, 2020 at 05:28:16PM -0600, Aditya Pakki wrote: > In case of an error in memblock_alloc, the code calls both panic and > BUG_ON. Revert the error handling to BUG_ON. > > Fixes: 8a7f97b902f4 (add checks for the return value of memblock_alloc*()) > Signed-off-by: Aditya Pakki <pakki001@xxxxxxx> Reviewed-by: Lubomir Rintel <lkundrak@xxxxx> Thank you Lubo > --- > arch/x86/platform/olpc/olpc_dt.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/arch/x86/platform/olpc/olpc_dt.c b/arch/x86/platform/olpc/olpc_dt.c > index 26d1f6693789..92d5ce1232ab 100644 > --- a/arch/x86/platform/olpc/olpc_dt.c > +++ b/arch/x86/platform/olpc/olpc_dt.c > @@ -137,9 +137,6 @@ void * __init prom_early_alloc(unsigned long size) > * wasted bootmem) and hand off chunks of it to callers. > */ > res = memblock_alloc(chunk_size, SMP_CACHE_BYTES); > - if (!res) > - panic("%s: Failed to allocate %zu bytes\n", __func__, > - chunk_size); > BUG_ON(!res); > prom_early_allocated += chunk_size; > memset(res, 0, chunk_size); > -- > 2.20.1 >