Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jun 2025 07:42:58 GMT
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 4d1ff6d22ba7 - stable/13 - dwc_otg_fdt: do not create and leak extra usbus child
Message-ID:  <202506270742.55R7gwIS006826@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by avg:

URL: https://cgit.FreeBSD.org/src/commit/?id=4d1ff6d22ba7eb33ebcae15a8c645cae8eea7f56

commit 4d1ff6d22ba7eb33ebcae15a8c645cae8eea7f56
Author:     Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2025-05-19 09:06:55 +0000
Commit:     Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2025-06-27 07:39:55 +0000

    dwc_otg_fdt: do not create and leak extra usbus child
    
    dwc_otg_init() already takes care of creating the bus and setting up sc
    to point to it.
    
    Fixes:          518da7ace813e
    
    (cherry picked from commit 97c799661a76b78963fd9f92a7e6bb452ebba999)
---
 sys/dev/usb/controller/dwc_otg_fdt.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/sys/dev/usb/controller/dwc_otg_fdt.c b/sys/dev/usb/controller/dwc_otg_fdt.c
index d698ace8e040..e256b60c902b 100644
--- a/sys/dev/usb/controller/dwc_otg_fdt.c
+++ b/sys/dev/usb/controller/dwc_otg_fdt.c
@@ -141,10 +141,6 @@ dwc_otg_attach(device_t dev)
 	if (sc->sc_otg.sc_irq_res == NULL)
 		goto error;
 
-	sc->sc_otg.sc_bus.bdev = device_add_child(dev, "usbus", -1);
-	if (sc->sc_otg.sc_bus.bdev == NULL)
-		goto error;
-
 	err = dwc_otg_init(&sc->sc_otg);
 	if (err == 0) {
 		err = device_probe_and_attach(sc->sc_otg.sc_bus.bdev);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506270742.55R7gwIS006826>