mirror of https://github.com/thesofproject/sof.git
library_manager: fix dma_deinit order
Fixes commit f90f5f9a14
dma ptr should be checked before dma->z_dev
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
This commit is contained in:
parent
f0a14a3f41
commit
7c623256cb
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue