drivers: dma: stm32: add null callback checking

Fix the STM32 DMA driver did not check if the optional dma_callback was
set in dma_stm32_configure(). This could lead to a hard fault when an
interrupt occurs and the callback is NULL, even though the API allows
the callback to be omitted.

Fixes #97454
Signed-off-by: Wenxi Xu <xuwenxi0517@gmail.com>
1 file changed