[PATCH] mailbox: imx-mailbox: fix uninitialized symbol 'val'

From: Peng Fan (OSS)
Date: Mon Jun 28 2021 - 03:04:13 EST


From: Peng Fan <peng.fan@xxxxxxx>

"val" not initialized on default path, so initialize val to 0 to fix
this issue.

Fixes: 91c8c1fbe498 ("mailbox: imx: add xSR/xCR register array")
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
---
drivers/mailbox/imx-mailbox.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
index bc51bd3c1999..6c6875dd30e7 100644
--- a/drivers/mailbox/imx-mailbox.c
+++ b/drivers/mailbox/imx-mailbox.c
@@ -282,6 +282,7 @@ static irqreturn_t imx_mu_isr(int irq, void *p)
(ctrl & IMX_MU_xCR_GIEn(priv->dcfg->type, cp->idx));
break;
default:
+ val = 0;
break;
}

--
2.30.0