aboutsummaryrefslogtreecommitdiff
path: root/product/sgm775
diff options
context:
space:
mode:
authorJim Quigley <jim.quigley@arm.com>2020-03-05 18:25:27 +0000
committernicola-mazzucato-arm <42373140+nicola-mazzucato-arm@users.noreply.github.com>2020-03-12 17:23:30 +0000
commita366c5c6da1a93a9f374784fb9a6af0edb4027fd (patch)
tree270d41194774a04112a9be40863fabc1b9199a9f /product/sgm775
parentc24d8666b033d87e02d2cec5b3fb031d6aa63a8d (diff)
fwk/fwk_mm_alloc: panic if memory allocation failed
Currently the framework will return NULL if the memory allocation fails. As the system will ultimately fail on receiving the error we could just panic instead, saving the memory used for the NULL checks. Change-Id: I731b87b7acb19d30df84936b07c76cbfe0d0726e Signed-off-by: Jim Quigley <jim.quigley@arm.com>
Diffstat (limited to 'product/sgm775')
-rw-r--r--product/sgm775/scp_ramfw/config_power_domain.c4
-rw-r--r--product/sgm775/scp_ramfw/config_ppu_v1.c4
2 files changed, 0 insertions, 8 deletions
diff --git a/product/sgm775/scp_ramfw/config_power_domain.c b/product/sgm775/scp_ramfw/config_power_domain.c
index c0d5fb54..3bda5673 100644
--- a/product/sgm775/scp_ramfw/config_power_domain.c
+++ b/product/sgm775/scp_ramfw/config_power_domain.c
@@ -208,13 +208,9 @@ static const struct fwk_element *sgm775_power_domain_get_element_table
+ FWK_ARRAY_SIZE(sgm775_power_domain_static_element_table)
+ 1, /* Terminator */
sizeof(struct fwk_element));
- if (element_table == NULL)
- return NULL;
pd_config_table = fwk_mm_calloc(sgm775_core_get_count(),
sizeof(struct mod_power_domain_element_config));
- if (pd_config_table == NULL)
- return NULL;
for (core_idx = 0; core_idx < sgm775_core_get_count(); core_idx++) {
element = &element_table[core_idx];
diff --git a/product/sgm775/scp_ramfw/config_ppu_v1.c b/product/sgm775/scp_ramfw/config_ppu_v1.c
index 89eec4d3..ceca4d35 100644
--- a/product/sgm775/scp_ramfw/config_ppu_v1.c
+++ b/product/sgm775/scp_ramfw/config_ppu_v1.c
@@ -55,13 +55,9 @@ static const struct fwk_element *sgm775_ppu_v1_get_element_table
*/
element_table = fwk_mm_calloc(sgm775_core_get_count() + 2,
sizeof(struct fwk_element));
- if (element_table == NULL)
- return NULL;
pd_config_table = fwk_mm_calloc(sgm775_core_get_count() + 1,
sizeof(struct mod_ppu_v1_pd_config));
- if (pd_config_table == NULL)
- return NULL;
for (core_idx = 0; core_idx < sgm775_core_get_count(); core_idx++) {
element = &element_table[core_idx];