Page MenuHomeFreeBSD

D56897.1795390152.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D56897.1795390152.diff

diff --git a/sys/arm/broadcom/bcm2835/bcm2838_pci.c b/sys/arm/broadcom/bcm2835/bcm2838_pci.c
--- a/sys/arm/broadcom/bcm2835/bcm2838_pci.c
+++ b/sys/arm/broadcom/bcm2835/bcm2838_pci.c
@@ -646,7 +646,7 @@
error = bcm_pcib_check_ranges(dev);
if (error != 0)
- return (error);
+ goto failed;
mtx_init(&sc->config_mtx, "bcm_pcib: config_mtx", NULL, MTX_DEF);
@@ -680,7 +680,8 @@
if (tries > 100) {
device_printf(dev,
"error: controller failed to start.\n");
- return (ENXIO);
+ error = ENXIO;
+ goto failed;
}
DELAY(1000);
@@ -690,7 +691,8 @@
if (!link_state) {
device_printf(dev, "error: controller started but link is not "
"up.\n");
- return (ENXIO);
+ error = ENXIO;
+ goto failed;
}
if (bootverbose)
device_printf(dev, "note: reported link speed is %s.\n",
@@ -741,12 +743,15 @@
/* Configure interrupts. */
error = bcm_pcib_msi_attach(dev);
if (error != 0)
- return (error);
+ goto failed;
/* Done. */
device_add_child(dev, "pci", DEVICE_UNIT_ANY);
bus_attach_children(dev);
return (0);
+failed:
+ pci_host_generic_destroy_fdt(dev);
+ return (error);
}
/*

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 22, 11:29 PM (2 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41918054
Default Alt Text
D56897.1795390152.diff (1 KB)

Event Timeline