mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
dmaengine: dw-axi-dmac: Improve axi_desc_put
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: https://github.com/raspberrypi/linux/issues/6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
This commit is contained in:
@@ -367,6 +367,7 @@ static void axi_desc_put(struct axi_dma_desc *desc)
|
||||
|
||||
for (descs_put = 0; descs_put < count; descs_put++) {
|
||||
hw_desc = &desc->hw_desc[descs_put];
|
||||
if (hw_desc->lli)
|
||||
dma_pool_free(chan->desc_pool, hw_desc->lli, hw_desc->llp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user