From 5039ff6dc23fca6ad65f44370e1a112e99f5bd4a Mon Sep 17 00:00:00 2001 From: Petros Koutoupis Date: Fri, 6 May 2016 12:18:37 -0700 Subject: [PATCH] hpsa: correct check for disk and zbc devices The check added always skips over every device and the ioaccel parameters are never set. Reviewed-by: Justin Lindley Acked-by: Don Brace Orabug: 23064595 Signed-off-by: Manjunath Govindashetty --- drivers/scsi/hpsa.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index f061459fd31f..d04f65efab71 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, for (j = 0; j < ndevices; j++) { if (dev[j] == NULL) continue; - if (dev[j]->devtype != TYPE_DISK) - continue; - if (dev[j]->devtype != TYPE_ZBC) + if ((dev[j]->devtype != TYPE_DISK) && + (dev[j]->devtype != TYPE_ZBC)) continue; if (is_logical_device(dev[j])) continue; @@ -1712,9 +1711,8 @@ static void hpsa_update_log_drive_phys_drive_ptrs(struct ctlr_info *h, for (i = 0; i < ndevices; i++) { if (dev[i] == NULL) continue; - if (dev[i]->devtype != TYPE_DISK) - continue; - if (dev[i]->devtype != TYPE_ZBC) + if ((dev[i]->devtype != TYPE_DISK) && + (dev[i]->devtype != TYPE_ZBC)) continue; if (!is_logical_device(dev[i])) continue; -- 2.50.1