Tegra: return BL32 entry point info if it is valid
This patch returns pointer to the BL32 entrypoint info only if
it is valid.
Change-Id: I71ce3c4626681753c94f3a7bbaa50c26c74874cb
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
diff --git a/plat/nvidia/tegra/common/tegra_bl31_setup.c b/plat/nvidia/tegra/common/tegra_bl31_setup.c
index 5be9a99..6237c80 100644
--- a/plat/nvidia/tegra/common/tegra_bl31_setup.c
+++ b/plat/nvidia/tegra/common/tegra_bl31_setup.c
@@ -100,7 +100,8 @@
if (type == NON_SECURE)
return &bl33_image_ep_info;
- if (type == SECURE)
+ /* return BL32 entry point info if it is valid */
+ if (type == SECURE && bl32_image_ep_info.pc)
return &bl32_image_ep_info;
return NULL;