summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Li <Frank.Li@nxp.com>2026-09-29 15:06:05 -0400
committerAndi Shyti <andi.shyti@kernel.org>2026-10-13 15:55:40 +0200
commit0f6be986ad0eb6fe7338d963a14eaf0dee87677d (patch)
treefdb5609a8688dc6868e06ca73ac60cde245e7bd8
parent38f5659310d94a81d512caab85cbc04993b870eb (diff)
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
-rw-r--r--drivers/i2c/busses/i2c-imx-lpi2c.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
index addd64985abc..7302464c371a 100644
--- a/drivers/i2c/busses/i2c-imx-lpi2c.c
+++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
@@ -851,7 +851,6 @@ desc_prepare_err_exit:
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 @@ desc_prepare_err_exit:
submit_err_exit:
lpi2c_dma_unmap(dma);
- dmaengine_desc_free(desc);
return -EINVAL;
}