From 98857c267d5825f8b3f3fd1040b7ce222b7f3958 Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Mon, 25 Sep 2023 13:22:42 -0700 Subject: [PATCH] ipm: imx: Initialize variable before using it Since the driver is passing the whole buffer, let's zero it to avoid pass garbage in case of size != buffer's size. Signed-off-by: Flavio Ceolin --- drivers/ipm/ipm_imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ipm/ipm_imx.c b/drivers/ipm/ipm_imx.c index da8a450982b..f0fc5488670 100644 --- a/drivers/ipm/ipm_imx.c +++ b/drivers/ipm/ipm_imx.c @@ -165,7 +165,7 @@ static int imx_mu_ipm_send(const struct device *dev, int wait, uint32_t id, { const struct imx_mu_config *config = dev->config; MU_Type *base = MU(config); - uint32_t data32[IMX_IPM_DATA_REGS]; + uint32_t data32[IMX_IPM_DATA_REGS] = {0}; #if !IS_ENABLED(CONFIG_IPM_IMX_REV2) mu_status_t status; #endif