projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b68fd09
)
dmaengine: dw: set cdesc to NULL when free cyclic transfers
author
Andy Shevchenko
<andriy.shevchenko@linux.intel.com>
Fri, 18 Mar 2016 14:24:54 +0000
(16:24 +0200)
committer
Vinod Koul
<vinod.koul@intel.com>
Wed, 13 Apr 2016 16:06:16 +0000
(21:36 +0530)
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>
drivers/dma/dw/core.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/dma/dw/core.c
b/drivers/dma/dw/core.c
index a6d96f32f4f928fa877f77fe4835883c182bf334..dd47d4b8aad650c8b65dc90def84fed30308e8cd 100644
(file)
--- 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);