Re: [PATCH 1/3] i2c: at91: release DMA channels on remove and probe error

From: Mukesh Savaliya

Date: Mon Aug 31 2026 - 05:17:30 EST




On 8/27/2026 9:13 PM, Shengzhuo Wei wrote:
at91_twi_configure_dma() requests exclusive tx/rx DMA channels, but
nothing ever releases them on driver detach, and the probe error path
after the channels are acquired (i2c_add_numbered_adapter() failure)
returns without releasing them either, because the remove callback is
not invoked after a failed probe.

Move the release into a helper, call it from the existing
configure-failure path, the adapter-registration failure path, and
at91_twi_remove().

Fixes: 60937b2cdbf9 ("i2c: at91: add dma support")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Shengzhuo Wei <me@xxxxxxxx>
Assisted-by: GLM:5.3
---
Acked-by: Mukesh Kumar Savaliya <mukesh.savaliya@xxxxxxxxxxxxxxxx>