Re: [PATCH] i2c: qup: Release DMA channels if interconnect lookup fails

From: Konrad Dybcio

Date: Thu Nov 05 2026 - 02:57:26 EST


On 11/5/26 8:42 AM, Yige Jiang wrote:
> qup_i2c_probe() acquires both BAM DMA channels before getting its
> interconnect path. If devm_of_icc_get() fails, the direct return
> skips fail_dma and leaks both channels, including when probe is
> deferred. A later probe can no longer acquire those channels.
>
> Keep the reported error code and jump to fail_dma to release the
> channels. This avoids the clock and MMIO cleanup, which have not
> been initialized at this point.
>
> Fixes: d4f35233a634 ("i2c: qup: Vote for interconnect bandwidth to DRAM")
> Signed-off-by: Yige Jiang <yigejiang86@xxxxxxxxx>
> ---

Can se use devm_dma_request_chan() instead?

Konrad