]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
driver/ukbus: Fix an invalid check in PCI probe
authorKha Dinh <khadinh@g.skku.edu>
Sun, 24 Sep 2023 13:39:43 +0000 (13:39 +0000)
committerRazvan Deaconescu <razvand@unikraft.io>
Fri, 20 Oct 2023 16:32:28 +0000 (19:32 +0300)
This causes the PCI driver to not initialize on certain systems.
The check should uses `==` instead.

Signed-off-by: Kha Dinh <khadinh@g.skku.edu>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #1110

drivers/ukbus/pci/arch/x86_64/pci_bus.c

index f8fd4e50564168dad7ed84a20897c70a44143b3c..1c6af669ff36d385e7447dd78740bb2d78cee73c 100644 (file)
@@ -230,7 +230,7 @@ int arch_pci_probe(struct uk_alloc *pha)
                        PCI_CONF_READ(uint32_t, &vendor_id,
                                        config_addr, VENDOR_ID);
 
-                       if (vendor_id != PCI_INVALID_ID)
+                       if (vendor_id == PCI_INVALID_ID)
                                break;
 
                        probe_bus(function);