mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
dma: edma.c: remove edma_desc leakage
Free memory allocated to edma_desc when failing to allocate slot. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
08d08bcdee
commit
2f6d8fad0a
@ -306,6 +306,7 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
|
||||
EDMA_SLOT_ANY);
|
||||
if (echan->slot[i] < 0) {
|
||||
dev_err(dev, "Failed to allocate slot\n");
|
||||
kfree(edesc);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user