Skip to content
Commit ba4a3550 authored by Gao Pan's avatar Gao Pan Committed by Mark Brown
Browse files

spi: imx: fix spi resource leak with dma transfer



In spi_imx_dma_transfer(), when desc_rx = dmaengine_prep_slave_sg()
fails, the context goes to label no_dma and then return. However,
the memory allocated for desc_tx has not been freed yet, which leads
to resource leak.

Signed-off-by: default avatarGao Pan <pandy.gao@nxp.com>
Reviewed-by: default avatarFugang Duan <B38611@freescale.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 390f0ffe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment