If device_attach() fails, we're expected to actually cleanup after
ourselves because device_detach() will not be called. Factor out the
cleanup bits that don't rely on attach having actually succeeded so
that we can cleanup properly in bcm2838_pci.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
looks good, not sure why free vs destroy though
| sys/dev/pci/pci_host_generic_fdt.c | ||
|---|---|---|
| 108 | why the naming difference? | |
| sys/dev/pci/pci_host_generic_fdt.c | ||
|---|---|---|
| 108 | Maybe silly, but destroy here to better parallel the setup verbiage and to match ofw_bus_gen_destroy_devinfo. I would've named it free if we had used alloc or nothing at all (i.e. just part of attach). | |