diff --git a/src/library_manager/lib_manager.c b/src/library_manager/lib_manager.c index 6d2104d6b..11fd19b95 100644 --- a/src/library_manager/lib_manager.c +++ b/src/library_manager/lib_manager.c @@ -464,9 +464,10 @@ static int lib_manager_dma_init(struct lib_manager_dma_ext *dma_ext, uint32_t dm static int lib_manager_dma_deinit(struct lib_manager_dma_ext *dma_ext, uint32_t dma_id) { if (dma_ext->dma) { - dma_put(dma_ext->dma); if (dma_ext->dma->z_dev) dma_release_channel(dma_ext->dma->z_dev, dma_id); + + dma_put(dma_ext->dma); } return 0; }