summaryrefslogtreecommitdiffstats
path: root/drivers/dma/edma.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2013-10-24 22:17:50 +0530
committerVinod Koul <vinod.koul@intel.com>2013-10-24 22:17:50 +0530
commit7261828776b33ff434837674413df2920e9ca2ff (patch)
tree580042f07f68da7f2bcf39ffa819dc3f9c887c28 /drivers/dma/edma.c
parent4b6271a64463f4fcbaf8b2e1d84704b7eb8c407c (diff)
dmaengine: edma: fix another memory leak
commit 4b6271a6 fix a menory leak but one more existed in driver so fix that Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/edma.c')
-rw-r--r--drivers/dma/edma.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 134fa96de1b..10b577fcf48 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -347,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;