diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2016-01-15 08:52:59 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-01-19 06:14:02 -0500 |
commit | cd17e153af499c74d7e347c8ad7eab273f55f20b (patch) | |
tree | 3a6a3a539f5e8cb9794920cbe68eb9b4abb9224c | |
parent | ef1f7fd7eba19eb64fc424355eb9d4e49ca06fb1 (diff) |
s390: remove superfluous memblock_alloc() return value checks
memblock_alloc() and memblock_alloc_base() will panic on their own if
they can't find free memory. Therefore remove some pointless checks.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/kernel/crash_dump.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 2 | ||||
-rw-r--r-- | arch/s390/numa/numa.c | 2 |
3 files changed, 0 insertions, 6 deletions
diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c index a92b39fd0e63..3986c9f62191 100644 --- a/arch/s390/kernel/crash_dump.c +++ b/arch/s390/kernel/crash_dump.c | |||
@@ -59,8 +59,6 @@ struct save_area * __init save_area_alloc(bool is_boot_cpu) | |||
59 | struct save_area *sa; | 59 | struct save_area *sa; |
60 | 60 | ||
61 | sa = (void *) memblock_alloc(sizeof(*sa), 8); | 61 | sa = (void *) memblock_alloc(sizeof(*sa), 8); |
62 | if (!sa) | ||
63 | return NULL; | ||
64 | if (is_boot_cpu) | 62 | if (is_boot_cpu) |
65 | list_add(&sa->list, &dump_save_areas); | 63 | list_add(&sa->list, &dump_save_areas); |
66 | else | 64 | else |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index a13468b9a913..3c65a8eae34d 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -623,8 +623,6 @@ void __init smp_save_dump_cpus(void) | |||
623 | return; | 623 | return; |
624 | /* Allocate a page as dumping area for the store status sigps */ | 624 | /* Allocate a page as dumping area for the store status sigps */ |
625 | page = memblock_alloc_base(PAGE_SIZE, PAGE_SIZE, 1UL << 31); | 625 | page = memblock_alloc_base(PAGE_SIZE, PAGE_SIZE, 1UL << 31); |
626 | if (!page) | ||
627 | panic("could not allocate memory for save area\n"); | ||
628 | /* Set multi-threading state to the previous system. */ | 626 | /* Set multi-threading state to the previous system. */ |
629 | pcpu_set_smt(sclp.mtid_prev); | 627 | pcpu_set_smt(sclp.mtid_prev); |
630 | boot_cpu_addr = stap(); | 628 | boot_cpu_addr = stap(); |
diff --git a/arch/s390/numa/numa.c b/arch/s390/numa/numa.c index b75ac43060e1..969b4ed4ed5e 100644 --- a/arch/s390/numa/numa.c +++ b/arch/s390/numa/numa.c | |||
@@ -58,8 +58,6 @@ static __init pg_data_t *alloc_node_data(void) | |||
58 | pg_data_t *res; | 58 | pg_data_t *res; |
59 | 59 | ||
60 | res = (pg_data_t *) memblock_alloc(sizeof(pg_data_t), 8); | 60 | res = (pg_data_t *) memblock_alloc(sizeof(pg_data_t), 8); |
61 | if (!res) | ||
62 | panic("Could not allocate memory for node data!\n"); | ||
63 | memset(res, 0, sizeof(pg_data_t)); | 61 | memset(res, 0, sizeof(pg_data_t)); |
64 | return res; | 62 | return res; |
65 | } | 63 | } |