Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 925a7d04 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Vinod Koul
Browse files

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent b68fd097
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);