fix(lib/realm): Fix coverity NULL_RETURNS scan defect
Fix Coverity scan NULL_RETURNS defect:
Event dereference: Dereferencing a pointer that
might be "NULL" "entry" when calling "xlat_read_tte".
This patch adds `assert(entry != NULL)`
before "xlat_read_tte(entry)" call.
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: I0cd2d32675aa892c506d555c4b2a52604998814e
diff --git a/lib/realm/src/buffer.c b/lib/realm/src/buffer.c
index 2509ddd..f5aa1d8 100644
--- a/lib/realm/src/buffer.c
+++ b/lib/realm/src/buffer.c
@@ -91,6 +91,7 @@
{
uint64_t *entry = xlat_get_tte_ptr(get_cached_llt_info(),
slot_to_va(slot));
+ assert(entry != NULL);
return xlat_read_tte(entry);
}