fix(psci): initialise variable to default zero
This corrects the MISRA violation C2012-9.1:
The value of an object with automatic storage duration shall not
be read before it has been set.
Initialized the variable to default value zero.
Change-Id: I225ae4487b05fc47728222765029d6e1fe292ac1
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
diff --git a/lib/psci/psci_mem_protect.c b/lib/psci/psci_mem_protect.c
index 68ad705..f6bbacd 100644
--- a/lib/psci/psci_mem_protect.c
+++ b/lib/psci/psci_mem_protect.c
@@ -13,7 +13,7 @@
u_register_t psci_mem_protect(unsigned int enable)
{
- int val;
+ int val = 0;
assert(psci_plat_pm_ops->read_mem_protect != NULL);
assert(psci_plat_pm_ops->write_mem_protect != NULL);