Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167124881
D17076.id47809.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
715 B
Referenced Files
None
Subscribers
None
D17076.id47809.diff
View Options
Index: sys/dev/intel/spi.c
===================================================================
--- sys/dev/intel/spi.c
+++ sys/dev/intel/spi.c
@@ -124,6 +124,7 @@
struct intelspi_softc {
ACPI_HANDLE sc_handle;
device_t sc_dev;
+ device_t sc_child;
struct mtx sc_mtx;
int sc_mem_rid;
struct resource *sc_mem_res;
@@ -468,7 +469,7 @@
intelspi_init(sc);
- device_add_child(dev, "spibus", -1);
+ sc->sc_child = device_add_child(dev, "spibus", -1);
return (bus_generic_attach(dev));
@@ -495,6 +496,9 @@
INTELSPI_LOCK_DESTROY(sc);
+ if (sc->sc_child != NULL)
+ device_delete_child(dev, sc->sc_child);
+
if (sc->sc_irq_ih)
bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_irq_ih);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 20, 7:39 AM (9 h, 30 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36983583
Default Alt Text
D17076.id47809.diff (715 B)
Attached To
Mode
D17076: intelspi: don't leak spibus children on detach
Attached
Detach File
Event Timeline
Log In to Comment