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 <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2023-09-25 13:22:42 -07:00 committed by Maureen Helm
commit 98857c267d

View file

@ -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