aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetros Koutoupis <petros@petroskoutoupis.com>2016-05-09 14:44:10 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2016-05-10 21:58:08 -0400
commitff615f065a48137e48985c78d8b17ce14b22fa90 (patch)
tree680e9f70f04a0ca68fc377717c232402abb989a8
parentd230823a1c4c3e97afd4c934b86b3975d5e20249 (diff)
hpsa: Fix type ZBC conditional checks
The device ID obtained from the inquiry can only be of a single type. The original code places a check for TYPE_ZBC right after the check for TYPE_DISK. Logically, if the first if statement sees a device of a TYPE_DISK and moves on to the second statement checking if not TYPE_ZBC, it will always hit the continue. [mkp: Applied by hand] Signed-off-by: Petros Koutoupis <petros@petroskoutoupis.com> Acked-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/hpsa.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index ff25d2082139..ff8dcd5b0631 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -1665,9 +1665,8 @@ static void hpsa_figure_phys_disk_ptrs(struct ctlr_info *h,
1665 for (j = 0; j < ndevices; j++) { 1665 for (j = 0; j < ndevices; j++) {
1666 if (dev[j] == NULL) 1666 if (dev[j] == NULL)
1667 continue; 1667 continue;
1668 if (dev[j]->devtype != TYPE_DISK) 1668 if (dev[j]->devtype != TYPE_DISK &&
1669 continue; 1669 dev[j]->devtype != TYPE_ZBC)
1670 if (dev[j]->devtype != TYPE_ZBC)
1671 continue; 1670 continue;
1672 if (is_logical_device(dev[j])) 1671 if (is_logical_device(dev[j]))
1673 continue; 1672 continue;
@@ -1712,9 +1711,8 @@ static void hpsa_update_log_drive_phys_drive_ptrs(struct ctlr_info *h,
1712 for (i = 0; i < ndevices; i++) { 1711 for (i = 0; i < ndevices; i++) {
1713 if (dev[i] == NULL) 1712 if (dev[i] == NULL)
1714 continue; 1713 continue;
1715 if (dev[i]->devtype != TYPE_DISK) 1714 if (dev[i]->devtype != TYPE_DISK &&
1716 continue; 1715 dev[i]->devtype != TYPE_ZBC)
1717 if (dev[i]->devtype != TYPE_ZBC)
1718 continue; 1716 continue;
1719 if (!is_logical_device(dev[i])) 1717 if (!is_logical_device(dev[i]))
1720 continue; 1718 continue;