Commit 4ff32d92 authored by Flavio Ceolin's avatar Flavio Ceolin Committed by Maureen Helm
Browse files

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: default avatarFlavio Ceolin <flavio.ceolin@intel.com>
parent 6654d185
Loading
Loading
Loading
Loading
+2 −3
Changes for drivers/ipm/ipm_mcux.c: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -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;