diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2024-03-13 22:05:54 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2024-03-13 22:05:54 +0000 |
| commit | 9dbf5b0e6876d8c93890754bcc9c748339de79c0 (patch) | |
| tree | e66b390b26cf9f10c541a80c8606789649e191c1 /sys/dev/hyperv | |
| parent | 2baed46e85d33b1f99e6f96033acc85a9a6fbba4 (diff) | |
Diffstat (limited to 'sys/dev/hyperv')
| -rw-r--r-- | sys/dev/hyperv/pcib/vmbus_pcib.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c index fd8a7feae984..f6237535cce3 100644 --- a/sys/dev/hyperv/pcib/vmbus_pcib.c +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c @@ -1725,19 +1725,18 @@ vmbus_pcib_adjust_resource(device_t dev, device_t child, } static int -vmbus_pcib_release_resource(device_t dev, device_t child, int type, int rid, - struct resource *r) +vmbus_pcib_release_resource(device_t dev, device_t child, struct resource *r) { struct vmbus_pcib_softc *sc = device_get_softc(dev); - if (type == PCI_RES_BUS) - return (pci_domain_release_bus(sc->hbus->pci_domain, child, - rid, r)); - - if (type == SYS_RES_IOPORT) + switch (rman_get_type(r)) { + case PCI_RES_BUS: + return (pci_domain_release_bus(sc->hbus->pci_domain, child, r)); + case SYS_RES_IOPORT: return (EINVAL); - - return (bus_generic_release_resource(dev, child, type, rid, r)); + default: + return (bus_generic_release_resource(dev, child, r)); + } } static int |
