From: Vinod Koul Date: Thu, 24 Oct 2013 16:47:50 +0000 (+0530) Subject: dmaengine: edma: fix another memory leak X-Git-Tag: MMI-PSA29.97-13-9~13410^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7261828776b33ff434837674413df2920e9ca2ff;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 --- diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 134fa96de1b3..10b577fcf48d 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;