Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christos Gkekas and committed by
Martin K. Petersen
c99dfd20 1010f21e

+1 -1
+1 -1
drivers/scsi/hpsa.c
··· 4091 4091 memset(id_ctlr, 0, sizeof(*id_ctlr)); 4092 4092 rc = hpsa_bmic_id_controller(h, id_ctlr, sizeof(*id_ctlr)); 4093 4093 if (!rc) 4094 - if (id_ctlr->configured_logical_drive_count < 256) 4094 + if (id_ctlr->configured_logical_drive_count < 255) 4095 4095 *nlocals = id_ctlr->configured_logical_drive_count; 4096 4096 else 4097 4097 *nlocals = le16_to_cpu(