From dced627c286f3cd5117eb1d2ec38693e85b2c25f Mon Sep 17 00:00:00 2001 From: Francois Ramu Date: Thu, 25 May 2023 08:50:00 +0200 Subject: [PATCH] drivers: flash stm32 qspi driver dma callback for positive statuses Like other stm32 drivers, especially the stm32 flash ospi, the DMA callback accepts a null or positive status. It returns an error in case of negative. BTW it also sets variable as unused, like stm32 flash ospi does. Signed-off-by: Francois Ramu --- drivers/flash/flash_stm32_qspi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/flash/flash_stm32_qspi.c b/drivers/flash/flash_stm32_qspi.c index 019b9e78bce..e9f26a94780 100644 --- a/drivers/flash/flash_stm32_qspi.c +++ b/drivers/flash/flash_stm32_qspi.c @@ -556,7 +556,9 @@ static void qspi_dma_callback(const struct device *dev, void *arg, { DMA_HandleTypeDef *hdma = arg; - if (status != 0) { + ARG_UNUSED(dev); + + if (status < 0) { LOG_ERR("DMA callback error with channel %d.", channel); }