]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
s390/crash: remove redundant panic() on save area allocation failure
authorAlexander Gordeev <agordeev@linux.ibm.com>
Fri, 15 Jul 2022 10:02:33 +0000 (12:02 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Wed, 20 Jul 2022 15:21:41 +0000 (17:21 +0200)
Make save_area_alloc() return classic NULL on allocation failure.
The only caller smp_save_dump_cpus() does check the return value
already and panics if NULL is returned.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/kernel/crash_dump.c

index 28124d0fa1d5e8839dc9a776f6739ca6b81950fb..117f13b3d1539ccb5cb4467125eaa85774f1d308 100644 (file)
@@ -63,7 +63,7 @@ struct save_area * __init save_area_alloc(bool is_boot_cpu)
 
        sa = memblock_alloc(sizeof(*sa), 8);
        if (!sa)
-               panic("Failed to allocate save area\n");
+               return NULL;
 
        if (is_boot_cpu)
                list_add(&sa->list, &dump_save_areas);