[PATCH 1/1] i2c: imx-lpi2c: remove dmaengine_desc_free()
Carlos Song
carlos.song at oss.nxp.com
Thu Oct 8 01:09:12 PDT 2026
> From: Frank Li <Frank.Li at nxp.com>
>
> 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 at nxp.com>
> ---
> drivers/i2c/busses/i2c-imx-lpi2c.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
> index 49aabef7f115c..d6f266e2d6bea 100644
> --- a/drivers/i2c/busses/i2c-imx-lpi2c.c
> +++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
> @@ -851,7 +851,6 @@ static int lpi2c_dma_rx_cmd_submit(struct lpi2c_imx_struct *lpi2c_imx)
> submit_err_exit:
> dma_unmap_single(txchan->device->dev, 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;
> }
>
Hi, Frank
LGTM.
Reviewed-by: Carlos Song <carlos.song at nxp.com>
--
Best Regards,
Carlos
More information about the linux-arm-kernel
mailing list