ahci: fix off-by-one in port count
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 9 Dec 2010 07:39:47 +0000 (08:39 +0100)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 12 Dec 2010 19:02:23 +0000 (14:02 -0500)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
src/ahci.c

index a03d8be43175465f5bb61bbb09b3db5221cbe464..4ccee86b1cbdb50b1d7936d209e37537d9b5f553 100644 (file)
@@ -417,7 +417,7 @@ ahci_detect(void *data)
     int rc;
 
     max = ctrl->caps & 0x1f;
-    for (pnr = 0; pnr < max; pnr++) {
+    for (pnr = 0; pnr <= max; pnr++) {
         if (!(ctrl->ports & (1 << pnr)))
             continue;
         dprintf(2, "AHCI/%d: probing\n", pnr);