aboutsummaryrefslogtreecommitdiff
path: root/module/psu/src
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 /module/psu/src
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 'module/psu/src')
-rw-r--r--module/psu/src/mod_psu.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/module/psu/src/mod_psu.c b/module/psu/src/mod_psu.c
index 4426193c..6f8d4538 100644
--- a/module/psu/src/mod_psu.c
+++ b/module/psu/src/mod_psu.c
@@ -275,8 +275,6 @@ static int mod_psu_init(
mod_psu_ctx.elements =
fwk_mm_calloc(element_count, sizeof(mod_psu_ctx.elements[0]));
- if (mod_psu_ctx.elements == NULL)
- return FWK_E_NOMEM;
return FWK_SUCCESS;
}