diff options
author | Jim Quigley <jim.quigley@arm.com> | 2020-03-05 18:25:27 +0000 |
---|---|---|
committer | nicola-mazzucato-arm <42373140+nicola-mazzucato-arm@users.noreply.github.com> | 2020-03-12 17:23:30 +0000 |
commit | a366c5c6da1a93a9f374784fb9a6af0edb4027fd (patch) | |
tree | 270d41194774a04112a9be40863fabc1b9199a9f /module/i2c | |
parent | c24d8666b033d87e02d2cec5b3fb031d6aa63a8d (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/i2c')
-rw-r--r-- | module/i2c/src/mod_i2c.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/module/i2c/src/mod_i2c.c b/module/i2c/src/mod_i2c.c index b4b7d9bb..2155debe 100644 --- a/module/i2c/src/mod_i2c.c +++ b/module/i2c/src/mod_i2c.c @@ -206,9 +206,6 @@ static int mod_i2c_init(fwk_id_t module_id, { ctx_table = fwk_mm_calloc(element_count, sizeof(ctx_table[0])); - if (ctx_table == NULL) - return FWK_E_NOMEM; - return FWK_SUCCESS; } |