From: Sandrine Bailleux Date: Mon, 19 Mar 2018 09:41:06 +0000 (+0100) Subject: Trusty: Fix sanity check on NS entry point X-Git-Url: http://git.openwrt.org/openwrt/feeds.git?a=commitdiff_plain;h=0d3feba9303a7fad186e4cc009f25bce6a7d4eb5;p=project%2Fbcm63xx%2Fatf.git Trusty: Fix sanity check on NS entry point This patch fixes the sanity check on the non-secure entrypoint value returned by bl31_plat_get_next_image_ep_info(). This issue has been reported by Coverity Scan Online: CID 264893 (#1 of 1): Dereference null return value (NULL_RETURNS) Dereferencing a null pointer ns_ep_info. Change-Id: Ia0f64d8c8b005f042608f1422ecbd42bc90b2fb4 Signed-off-by: Sandrine Bailleux --- diff --git a/services/spd/trusty/trusty.c b/services/spd/trusty/trusty.c index d6e57267..97f202cb 100644 --- a/services/spd/trusty/trusty.c +++ b/services/spd/trusty/trusty.c @@ -451,7 +451,7 @@ static int32_t trusty_setup(void) uint32_t spsr; ns_ep_info = bl31_plat_get_next_image_ep_info(NON_SECURE); - if (!ep_info) { + if (ns_ep_info == NULL) { NOTICE("Trusty: non-secure image missing.\n"); return -1; }