Skip to content

Commit c99dfd2

Browse files
chggrmartinkpetersen
authored andcommitted
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 <[email protected]> Acked-by: Don Brace <[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 1010f21 commit c99dfd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/hpsa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4091,7 +4091,7 @@ static int hpsa_set_local_logical_count(struct ctlr_info *h,
40914091
memset(id_ctlr, 0, sizeof(*id_ctlr));
40924092
rc = hpsa_bmic_id_controller(h, id_ctlr, sizeof(*id_ctlr));
40934093
if (!rc)
4094-
if (id_ctlr->configured_logical_drive_count < 256)
4094+
if (id_ctlr->configured_logical_drive_count < 255)
40954095
*nlocals = id_ctlr->configured_logical_drive_count;
40964096
else
40974097
*nlocals = le16_to_cpu(

0 commit comments

Comments
 (0)