aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@arm.com>2020-09-29 07:17:38 +0530
committerThomas Abraham <thomas.abraham@arm.com>2020-11-28 01:48:28 +0530
commit844859edf19ff3f7527045cc798d481ed29df613 (patch)
treedf9f9700ee1cf4f9a240e8baf572e2c742d101d0
parentdc2daf83bfac875660d605c8266c9072f64873e2 (diff)
bootloader: ensure module config is provided
Prior to using the module config data, ensure that there is a valid config data to use. Change-Id: I899fe4b53b076f354f5215a723cbb2d1d1bd0b68 Signed-off-by: Thomas Abraham <thomas.abraham@arm.com>
-rw-r--r--module/bootloader/src/mod_bootloader.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/bootloader/src/mod_bootloader.c b/module/bootloader/src/mod_bootloader.c
index 85315b40..c22b120a 100644
--- a/module/bootloader/src/mod_bootloader.c
+++ b/module/bootloader/src/mod_bootloader.c
@@ -71,6 +71,8 @@ static int load_image(void)
bool sds = false;
+ if (module_ctx.module_config == NULL)
+ return FWK_E_PARAM;
if (module_ctx.module_config->source_base == 0)
return FWK_E_PARAM;
if (module_ctx.module_config->destination_base == 0)