xen/arm: initialize access

Initialize variable *access before returning it back to the caller.
It makes the code a bit nicer and it is a safety certification
requirement.

M3CM Rule-9.1: The value of an object with automatic storage duration
shall not be read before it has been set

QAVerify: 2962
Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Acked-by: Julien Grall <julien.grall@arm.com>
CC: rcojocaru@bitdefender.com
CC: Tamas K Lengyel <tamas@tklengyel.com>
This commit is contained in:
Stefano Stabellini authored and Julien Grall committed 2018-11-09 11:49:40 +00:00
1 parent fe8afc2dc6
commit 8d84e701fd
1 file changed
+1
+1
View File
@@ -47,6 +47,7 @@ static int __p2m_get_mem_access(struct domain *d, gfn_t gfn,
};
ASSERT(p2m_is_locked(p2m));
*access = p2m->default_access;
/* If no setting was ever set, just return rwx. */
if ( !p2m->mem_access_enabled )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.