dmaengine: PL08x: ensure all descriptors are freed when channel is released
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 26 May 2012 16:00:49 +0000 (17:00 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 1 Jul 2012 13:16:10 +0000 (14:16 +0100)
Ensure all queued descriptors are freed when the channel is released,
ensuring we don't leak memory

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/dma/amba-pl08x.c

index a5d85b101b89483f95c0ec520cc70da996c509f0..6fbeebb9486fdae644a0268393c7650033b856b4 100644 (file)
@@ -1117,6 +1117,8 @@ static int pl08x_alloc_chan_resources(struct dma_chan *chan)
 
 static void pl08x_free_chan_resources(struct dma_chan *chan)
 {
+       /* Ensure all queued descriptors are freed */
+       vchan_free_chan_resources(to_virt_chan(chan));
 }
 
 static struct dma_async_tx_descriptor *pl08x_prep_dma_interrupt(
This page took 0.027404 seconds and 5 git commands to generate.