i2c: imx-lpi2c: remove dmaengine_desc_free()

dmaengine_desc_free() is designed for DMA_CTRL_REUSE. If DMA_CTRL_REUSE
is not set, dmaengine_desc_free() will return -EPERM.

	if (!dmaengine_desc_test_reuse(desc))
		return -EPERM;

So calling dmaengine_desc_free() does nothing. dmaengine_terminate_(a)sync()
will free all already allocated descriptors.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Carlos Song <carlos.song@nxp.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://patch.msgid.link/20260929190605.3516147-1-Frank.Li@oss.nxp.com
This commit is contained in:
Frank Li 2026-09-29 15:06:05 -04:00 committed by Andi Shyti
parent 38f5659310
commit 0f6be986ad
No known key found for this signature in database
GPG Key ID: DA78056626D32D6E

View File

@ -851,7 +851,6 @@ static int lpi2c_dma_rx_cmd_submit(struct lpi2c_imx_struct *lpi2c_imx)
submit_err_exit:
dma_unmap_single(dmaengine_get_dma_device(txchan), dma->dma_tx_addr,
dma->rx_cmd_buf_len, DMA_TO_DEVICE);
dmaengine_desc_free(rx_cmd_desc);
return -EINVAL;
}
@ -910,7 +909,6 @@ static int lpi2c_dma_submit(struct lpi2c_imx_struct *lpi2c_imx)
submit_err_exit:
lpi2c_dma_unmap(dma);
dmaengine_desc_free(desc);
return -EINVAL;
}