Commit 4b6271a6 authored by Valentin Ilie's avatar Valentin Ilie Committed by Vinod Koul

dma: edma: Fix memory leak

When it fails to allocate a slot, edesc should be free'd before return;
Signed-off-by: default avatarValentin Ilie <>
Signed-off-by: default avatarVinod Koul <>
parent 18ebd564
......@@ -305,6 +305,7 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
if (echan->slot[i] < 0) {
dev_err(dev, "Failed to allocate slot\n");
return NULL;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment