[SCSI] lpfc 8.3.13: Misc fixes
[pandora-kernel.git] / drivers / scsi / lpfc / lpfc_vport.c
index ab91359..1655507 100644 (file)
@@ -782,7 +782,7 @@ lpfc_destroy_vport_work_array(struct lpfc_hba *phba, struct lpfc_vport **vports)
        int i;
        if (vports == NULL)
                return;
-       for (i = 0; vports[i] != NULL && i <= phba->max_vports; i++)
+       for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++)
                scsi_host_put(lpfc_shost_from_vport(vports[i]));
        kfree(vports);
 }