mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 18:53:52 +08:00
dmaengine: dw: set cdesc to NULL when free cyclic transfers
To be sure we have the cyclic transfers already gone we set cdesc to NULL. It will prevent the double free. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
b68fd09762
commit
925a7d045e
@ -1522,6 +1522,8 @@ void dw_dma_cyclic_free(struct dma_chan *chan)
|
||||
kfree(cdesc->desc);
|
||||
kfree(cdesc);
|
||||
|
||||
dwc->cdesc = NULL;
|
||||
|
||||
clear_bit(DW_DMA_IS_CYCLIC, &dwc->flags);
|
||||
}
|
||||
EXPORT_SYMBOL(dw_dma_cyclic_free);
|
||||
|
Loading…
Reference in New Issue
Block a user