summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-stm32-ospi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-stm32-ospi.c')
-rw-r--r--drivers/spi/spi-stm32-ospi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/spi/spi-stm32-ospi.c b/drivers/spi/spi-stm32-ospi.c
index 668022098b1e..9ec9823409cc 100644
--- a/drivers/spi/spi-stm32-ospi.c
+++ b/drivers/spi/spi-stm32-ospi.c
@@ -960,6 +960,10 @@ err_pm_resume:
err_pm_enable:
pm_runtime_force_suspend(ospi->dev);
mutex_destroy(&ospi->lock);
+ if (ospi->dma_chtx)
+ dma_release_channel(ospi->dma_chtx);
+ if (ospi->dma_chrx)
+ dma_release_channel(ospi->dma_chrx);
return ret;
}