From 4ff32d9290da561365f063aa0c4394bc6d531e0d Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Mon, 25 Sep 2023 13:19:57 -0700 Subject: [PATCH] ipm: mcux: 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_mcux.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/ipm/ipm_mcux.c b/drivers/ipm/ipm_mcux.c index 93267f5c58b..2365f58aacc 100644 --- a/drivers/ipm/ipm_mcux.c +++ b/drivers/ipm/ipm_mcux.c @@ -81,9 +81,8 @@ static int mcux_mailbox_ipm_send(const struct device *d, int wait, { const struct mcux_mailbox_config *config = d->config; MAILBOX_Type *base = config->base; - uint32_t data32[MCUX_IPM_DATA_REGS]; /* Until we change API - * to uint32_t array - */ + /* Until we change API to uint32_t array */ + uint32_t data32[MCUX_IPM_DATA_REGS] = {0}; unsigned int flags; int i;