]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: stm32-mdma: memset stm32_mdma_chan_config struct before using it
authorAmelie Delaunay <amelie.delaunay@foss.st.com>
Mon, 17 Oct 2022 13:14:13 +0000 (15:14 +0200)
committerVinod Koul <vkoul@kernel.org>
Wed, 19 Oct 2022 13:31:19 +0000 (19:01 +0530)
commiteba8733435fc104ceea05ace2807df4cc703e8e8
treebd298cf0cc0b34d36efef33c4baa96338e5a8abe
parentf9cd8e124bf669aeea2383cd3379e3e16e75ceea
dmaengine: stm32-mdma: memset stm32_mdma_chan_config struct before using it

New bool m2m_hw has been added at the end of stm32_mdma_chan_config struct
to support the STM32 DMA MDMA chaining.

m2m_hw is set true in stm32_mdma_slave_config() if peripheral_size is set,
but m2m_hw is never initialized false.

To ensure this case, and any further new update of the structure, memset it
to 0 before using it.

Fixes: d5454ac9baec ("dmaengine: stm32-mdma: add support to be triggered by STM32 DMA")
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20221017131413.202567-1-amelie.delaunay@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/stm32-mdma.c