diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2016-03-18 17:24:54 +0300 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-04-13 19:06:16 +0300 |
commit | 925a7d045e6f0129bc58ccd4c3a8dcef62486345 (patch) | |
tree | ab275ecdc781f0902ca110aff28b27174d582c20 /drivers/dma/dw | |
parent | b68fd0976286e0cc4e163a83b8b68d6efca814dd (diff) | |
download | linux-925a7d045e6f0129bc58ccd4c3a8dcef62486345.tar.xz |
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>
Diffstat (limited to 'drivers/dma/dw')
-rw-r--r-- | drivers/dma/dw/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c index a6d96f32f4f9..dd47d4b8aad6 100644 --- a/drivers/dma/dw/core.c +++ b/drivers/dma/dw/core.c @@ -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); |