Fix a logic error in pci_device_netbsd_write()
authorMatthieu Herrb <matthieu.herrb@laas.fr>
Sun, 7 Dec 2008 18:18:29 +0000 (19:18 +0100)
committerMatthieu Herrb <matthieu.herrb@laas.fr>
Sun, 7 Dec 2008 18:18:29 +0000 (19:18 +0100)
This is the same error as in pci_device_openbsd_write() that actually
prevented it to write anything.

src/netbsd_pci.c

index 8b39edf..f33b3eb 100644 (file)
@@ -198,7 +198,7 @@ pci_device_netbsd_write(struct pci_device *dev, const void *data,
 {
        struct pciio_bdf_cfgreg io;
 
-       if ((offset % 4) == 0 || (size % 4) == 0)
+       if ((offset % 4) != 0 || (size % 4) != 0)
                return EINVAL;
 
        io.bus = dev->bus;