diff options
| author | Ruoyu Wang <ruoyuw560@gmail.com> | 2026-08-15 23:17:20 +0800 |
|---|---|---|
| committer | Andi Shyti <andi.shyti@kernel.org> | 2026-08-19 21:55:53 +0200 |
| commit | 777979e627115734052b323d2721cdb500e81dcf (patch) | |
| tree | f65712dc84dd9641ef8f94c864241c97892b144d /tools/perf/scripts/python/bin | |
| parent | 62edb8ca0aa44517cc23cfa26cd8a51f15ea92fe (diff) | |
i2c: mxs: fix DMA channel leak on probe error
mxs_i2c_probe() requests an exclusive DMA channel before resetting the
controller and registering the I2C adapter. If either later operation
fails, probe returns without releasing the channel because the remove
callback is not invoked after a failed probe.
Use devm_dma_request_chan() so the device core releases the channel on
probe failure and driver detach. Remove the manual release from the
remove callback because the channel is now device-managed.
This issue was found by a static analysis checker and confirmed by
manual source review.
Fixes: 62885f59a261 ("MXS: Implement DMA support into mxs-i2c")
Assisted-by: unnamed:claude-opus-4.8 typestate
Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com>
Cc: <stable@vger.kernel.org> # v3.7+
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://patch.msgid.link/20260815151720.3757460-1-ruoyuw560@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
