⬢ DragonFlyBSD Kernel Audit
DF-4867 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/disk/nata/chipsets/ata-intel.c
+++ b/sys/dev/disk/nata/chipsets/ata-intel.c
@@ -174,7 +174,7 @@
 	/*
 	 * if we have AHCI capability and AHCI or RAID mode enabled
 	 * in BIOS we try for AHCI mode
 	 */
 	if ((ctlr->chip->cfg1 == INTEL_AHCI) &&
 	    (pci_read_config(dev, 0x90, 1) & 0xc0) &&
-	    (ata_ahci_chipinit(dev) != ENXIO))
+	    (ata_ahci_chipinit(dev) == 0))
 	    return 0;
 
 	/* if BAR(5) is IO it should point to SATA interface registers */