aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-10-27 10:13:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-10-27 10:13:03 -0700
commit63e656083d2b280d42464e0a4297cdc48d6f75d3 (patch)
treeefda718c7308334844f9e89fef6fc96eaf24a7f9 /drivers
parent20582e34c8c1364bce15d776bce3c9c0f108132f (diff)
parent7261828776b33ff434837674413df2920e9ca2ff (diff)
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine fixes from Vinod Koul: "Here is the late fixes pull request for dmaengine while you fly back from KS. We have a new dmaengine ML hosted by vger so a patch for that along with addition of Dave as driver mainatainer for ioat. Other fixes are memeory leak fixes on edma driver, small fixes on rcar-hpbdma driver by Sergei" * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: edma: fix another memory leak dma: edma: Fix memory leak MAINTAINERS: add to ioatdma maintainer list MAINTAINERS: add the new dmaengine mailing list
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dma/edma.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 3519111c566..10b577fcf48 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -305,6 +305,7 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
edma_alloc_slot(EDMA_CTLR(echan->ch_num),
EDMA_SLOT_ANY);
if (echan->slot[i] < 0) {
+ kfree(edesc);
dev_err(dev, "Failed to allocate slot\n");
kfree(edesc);
return NULL;
@@ -346,6 +347,7 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
ccnt = sg_dma_len(sg) / (acnt * bcnt);
if (ccnt > (SZ_64K - 1)) {
dev_err(dev, "Exceeded max SG segment size\n");
+ kfree(edesc);
return NULL;
}
cidx = acnt * bcnt;