Index: sys/dev/virtio/pci/virtio_pci.c =================================================================== --- sys/dev/virtio/pci/virtio_pci.c +++ sys/dev/virtio/pci/virtio_pci.c @@ -273,20 +273,20 @@ return (BUS_PROBE_DEFAULT); } -static int -vtpci_attach_probe_msix(device_t dev, struct vtpci_softc *sc) +static bool +vtpci_probe_msix(device_t dev, struct vtpci_softc *sc) { int rid, table_rid; if (pci_find_cap(dev, PCIY_MSIX, NULL) != 0) - return (1); + return (false); rid = table_rid = pci_msix_table_bar(dev); if (rid != PCIR_BAR(0)) { sc->vtpci_msix_table_res = bus_alloc_resource_any( dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->vtpci_msix_table_res == NULL) - return (1); + return (false); } rid = pci_msix_pba_bar(dev); @@ -294,10 +294,10 @@ sc->vtpci_msix_pba_res = bus_alloc_resource_any( dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->vtpci_msix_pba_res == NULL) - return (1); + return (false); } - return (0); + return (true); } static int @@ -332,7 +332,7 @@ if (pci_find_cap(dev, PCIY_MSI, NULL) != 0) sc->vtpci_flags |= VTPCI_FLAG_NO_MSI; - if (vtpci_attach_probe_msix(dev, sc) != 0) + if (!vtpci_probe_msix(dev, sc)) sc->vtpci_flags |= VTPCI_FLAG_NO_MSIX; vtpci_reset(sc);