From nobody Thu Jun 11 16:58:41 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gbpkp3hr5z6hspF for ; Thu, 11 Jun 2026 16:58:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gbpkp0z4tz41Hs for ; Thu, 11 Jun 2026 16:58:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781197122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rjvAEU9isFBW+8Un3r7OzZek1O6GPlLyhDixCu7lEY4=; b=ppTQDPWWrJhZFzZXbRIB/BgvKg4rmgdJldxslQRCWPGIAunf5bGRiTvCepYwcNuvyaewIP tCP/+vysg4/t5HB6dT6dIsHvPPGjHNRlR//SrsqN4lNZ3HA3j0NYmwRkffb3jvwDHCyn/V sV5krLuOSSycpRf5mp2jF2XohBLAaSDepddpa5ozSUybGNHrjsxLNf0oUlzNDLGSfBe0Gs Q30oV4UYwb++idnQSow6PJRZWjlmHrmuLAR12uK/ruG9NSCte7vVjAVXS5zxFglvHB/3Uh 4rvlfamyNpLhMaYpek+kObh5PV+fROx5Q8e/tId5fjme4oB+JQR0AsLybZ6O+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781197122; a=rsa-sha256; cv=none; b=uHkbo04e5sn56pUMgJi8ZV/1z4L+oifx18y+FcfJ3jAlgAUbBXOpEKI000YsuvEeCwj7ta deS9i+89vV/EbVyfQc1Tv/n5ECdcblvvZHKRo14Nt/ShryyshUCLP1smqJI+EKHlisd0Nz HhYYXRCTqbyGVEyn2ukH8EO/PCwUm075gSI8xyVaYgBvnqQ53PFTSt5zbrRyRmQvwBbPK4 FmcN0xU1srwwQ7ri7Dx9vgTVa9H+gB7wxH0qQdRXeX0faY10rr03P8ejpgLICMbBVJHZzg p/wK+bZt9bWt+kmWyPt6y6sLdrAUu2/grR9ikgm0qpbDU81aJ4MYqkKTRjtLfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781197122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rjvAEU9isFBW+8Un3r7OzZek1O6GPlLyhDixCu7lEY4=; b=M4bajH89iystKyHRBbhjn6hleTE/Ktzig0Mo3ZdX/pYxGDNsK09ingWpzT0NxzgOM7U8zq rDpIIg1Vqzf7J0IZ8fO0ZJ2i2epj0DqfTiMGZTeJNhcCQXfP1C+agzP1c/CAhJeerpJNG9 skVPi7q8fV76t48vxZI9g0968vUvaGwDxikQ0lyXOCYIpTebxtLWxkxE4ypqwyrPEgvBuz P3eVP3VgWm8j9e+hyDT344D8hHKjaCXHLHrcW80/U/MW/Jj1xWQHyHEZMdOgxFCLWpVpdF 1pOJXHfSlhvBqbsSBQZHwfnbpeFejg7345lDD4WYeaSZVrp048wDsekgibHfFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gbpkn6M1gz105r for ; Thu, 11 Jun 2026 16:58:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3af18 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Jun 2026 16:58:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Haoxiang Li From: Mitchell Horne Subject: git: 648ac179d28f - stable/15 - bcm2835_sdhci: Clean up DMA resources on attach failure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 648ac179d28f5c15d8d84b7bb369008a3661fa6f Auto-Submitted: auto-generated Date: Thu, 11 Jun 2026 16:58:41 +0000 Message-Id: <6a2ae941.3af18.6c18df1e@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=648ac179d28f5c15d8d84b7bb369008a3661fa6f commit 648ac179d28f5c15d8d84b7bb369008a3661fa6f Author: Haoxiang Li AuthorDate: 2026-05-27 02:42:43 +0000 Commit: Mitchell Horne CommitDate: 2026-06-11 16:39:31 +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 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 e0c4327d8e05..6e974a1a61bb 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)