diff --git a/drivers/dma/dma_stm32.c b/drivers/dma/dma_stm32.c index b1ad48f2eb..d90278b248 100644 --- a/drivers/dma/dma_stm32.c +++ b/drivers/dma/dma_stm32.c @@ -265,9 +265,11 @@ DMA_STM32_EXPORT_API int dma_stm32_configure(const struct device *dev, struct dma_stm32_stream *stream = &dev_config->streams[id - STREAM_OFFSET]; DMA_TypeDef *dma = (DMA_TypeDef *)dev_config->base; - LL_DMA_InitTypeDef DMA_InitStruct = {0}; + LL_DMA_InitTypeDef DMA_InitStruct; int ret; + LL_DMA_StructInit(&DMA_InitStruct); + /* give channel from index 0 */ id = id - STREAM_OFFSET;