Commit 62b5cb75 authored by Ludovic Desroches's avatar Ludovic Desroches Committed by Vinod Koul

dmaengine: at_xdmac: fix memory leak in interleaved mode

In interleaved mode, when numf > 1, we have only one descriptor for the
transfer but this descriptor has to be added to the descs_list. If not,
when doing remove_xfer, the descriptor won't be put back in the
free_descs_list.
Signed-off-by: default avatarLudovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 4e538578
...@@ -958,6 +958,10 @@ at_xdmac_prep_interleaved(struct dma_chan *chan, ...@@ -958,6 +958,10 @@ at_xdmac_prep_interleaved(struct dma_chan *chan,
xt, xt->sgl); xt, xt->sgl);
for (i = 0; i < xt->numf; i++) for (i = 0; i < xt->numf; i++)
at_xdmac_increment_block_count(chan, first); at_xdmac_increment_block_count(chan, first);
dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
__func__, first, first);
list_add_tail(&first->desc_node, &first->descs_list);
} else { } else {
for (i = 0; i < xt->frame_size; i++) { for (i = 0; i < xt->frame_size; i++) {
size_t src_icg = 0, dst_icg = 0; size_t src_icg = 0, dst_icg = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment