]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/scsi/qla2xxx/qla_iocb.c
[SCSI] qla2xxx: Fixup looking for a space in the outstanding_cmds array in qla2x00_al...
[mirror_ubuntu-artful-kernel.git] / drivers / scsi / qla2xxx / qla_iocb.c
index 8c5dec2e3b6de6c4533c9bb6dbf487df95def374..e607568bce49e2a8608491ba84f1ac65d73af51e 100644 (file)
@@ -1814,7 +1814,7 @@ qla2x00_alloc_iocbs(scsi_qla_host_t *vha, srb_t *sp)
 
        /* Check for room in outstanding command list. */
        handle = req->current_outstanding_cmd;
-       for (index = 1; req->num_outstanding_cmds; index++) {
+       for (index = 1; index < req->num_outstanding_cmds; index++) {
                handle++;
                if (handle == req->num_outstanding_cmds)
                        handle = 1;