diff options
| author | Anfernee Cao <anferneemelokc5@gmail.com> | 2026-10-17 00:37:07 +0800 |
|---|---|---|
| committer | Ulf Hansson <ulfh@kernel.org> | 2026-11-05 18:56:25 +0100 |
| commit | 2d8927fadbf95e2d2dfa95bcc73882d6e19c2ce4 (patch) | |
| tree | 0536552f69fcdec56508c2d4a6496359d81ee05e /include/linux | |
| parent | 18e9f7fb05ada68d491ff49165b9644f790e0e0c (diff) | |
mmc: mmci: fix DMA channel leak when mmc_add_host() fails
mmci_probe() calls mmci_dma_setup(), which acquires the RX and TX DMA
channels via dma_request_chan(). These channels are not managed by
devres, and are released only by mmci_dma_release().
If the following mmc_add_host() fails, probe jumps to the clk_disable
label, which only disables the clock. As probe then fails,
mmci_remove() is never called, so both DMA channels are leaked.
Release them by adding a dedicated unwind label, reached only after
mmci_dma_setup().
This issue was found by manual code inspection.
Fixes: b38a20f29a49 ("mmc: mmci: fix return value check of mmc_add_host()")
Cc: stable@vger.kernel.org
Signed-off-by: Anfernee Cao <anferneemelokc5@gmail.com>
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
