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

Peng Fan (OSS) peng.fan at oss.nxp.com
Mon Jun 28 00:37:29 PDT 2021


From: Peng Fan <peng.fan at nxp.com>

"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 at oracle.com>
Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
 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




More information about the linux-arm-kernel mailing list