Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72618287 authored by Vinod Koul's avatar Vinod Koul
Browse files

dmaengine: edma: fix another memory leak



commit 4b6271a6 fix a menory leak but one more existed in driver so fix that

Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 4b6271a6
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -347,6 +347,7 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
			ccnt = sg_dma_len(sg) / (acnt * bcnt);
			ccnt = sg_dma_len(sg) / (acnt * bcnt);
			if (ccnt > (SZ_64K - 1)) {
			if (ccnt > (SZ_64K - 1)) {
				dev_err(dev, "Exceeded max SG segment size\n");
				dev_err(dev, "Exceeded max SG segment size\n");
				kfree(edesc);
				return NULL;
				return NULL;
			}
			}
			cidx = acnt * bcnt;
			cidx = acnt * bcnt;