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

View file

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