The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3fbdaeeed45c151318d844981a3725f48a6261a5
commit 3fbdaeeed45c151318d844981a3725f48a6261a5 Author: Haoxiang Li <[email protected]> AuthorDate: 2026-05-27 02:42:43 +0000 Commit: Mitchell Horne <[email protected]> CommitDate: 2026-06-11 17:11:40 +0000 bcm2835_sdhci: Clean up DMA resources on attach failure bcm_sdhci_attach() allocates a DMA channel with bcm_dma_allocate() before creating the bus_dma tag and map. If a later initialization step fails, the common error path releases the interrupt and memory resources, but leaves the DMA channel allocated. Call bcm_dma_free() for cleanup, as it already performs the required internal checks and can therefore be invoked directly. Signed-off-by: Haoxiang Li <[email protected]> Reviewed by: mhorne MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/2241 (cherry picked from commit d1488cd762bee79240a715bf04f3d30e9a121b26) --- sys/arm/broadcom/bcm2835/bcm2835_sdhci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c index b9d619f8d791..94647a5e9a5d 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c @@ -365,6 +365,7 @@ bcm_sdhci_attach(device_t dev) return (0); fail: + bcm_dma_free(sc->sc_dma_ch); if (sc->sc_intrhand) bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_intrhand); if (sc->sc_irq_res)
