commit | ba4a3550e93415f4ff300810b8d0659949fea193 | [log] [tgz] |
---|---|---|
author | Gao Pan <pandy.gao@nxp.com> | Mon Jan 18 15:44:01 2016 +0800 |
committer | Mark Brown <broonie@kernel.org> | Fri Feb 19 00:12:52 2016 +0000 |
tree | c00efada7dfe0fc50c1e4d1f6a348245baf18f3a | |
parent | 390f0ffe92aea878b763c7fd8afd1dff62e0d20b [diff] |
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: Gao Pan <pandy.gao@nxp.com> Reviewed-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>