diff options
author | Christos Gkekas <chris.gekas@gmail.com> | 2017-10-16 20:28:02 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-10-16 23:14:31 -0400 |
commit | c99dfd20f295b2b8c46da5185c0889493ba1f291 (patch) | |
tree | cb9c0dbb02e24f28d9171363e84455436a1f4b16 /drivers/scsi/hpsa.c | |
parent | 1010f21ecf8ac43be676d498742de18fa6c20987 (diff) |
scsi: hpsa: Fix configured_logical_drive_count·check
Check whether configured_logical_drive_count is less than 255. Previous
check was always evaluating to true as this variable is defined as u8.
Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
Acked-by: Don Brace <don.brace@microsemi.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r-- | drivers/scsi/hpsa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 9abe81021484..4ed3d26ffdde 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -4091,7 +4091,7 @@ static int hpsa_set_local_logical_count(struct ctlr_info *h, memset(id_ctlr, 0, sizeof(*id_ctlr)); rc = hpsa_bmic_id_controller(h, id_ctlr, sizeof(*id_ctlr)); if (!rc) - if (id_ctlr->configured_logical_drive_count < 256) + if (id_ctlr->configured_logical_drive_count < 255) *nlocals = id_ctlr->configured_logical_drive_count; else *nlocals = le16_to_cpu( |