提交 925a7d04 编写于 作者: A Andy Shevchenko 提交者: Vinod Koul

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: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 b68fd097
...@@ -1522,6 +1522,8 @@ void dw_dma_cyclic_free(struct dma_chan *chan) ...@@ -1522,6 +1522,8 @@ void dw_dma_cyclic_free(struct dma_chan *chan)
kfree(cdesc->desc); kfree(cdesc->desc);
kfree(cdesc); kfree(cdesc);
dwc->cdesc = NULL;
clear_bit(DW_DMA_IS_CYCLIC, &dwc->flags); clear_bit(DW_DMA_IS_CYCLIC, &dwc->flags);
} }
EXPORT_SYMBOL(dw_dma_cyclic_free); EXPORT_SYMBOL(dw_dma_cyclic_free);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册