Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c99dfd20 authored by Christos Gkekas's avatar Christos Gkekas Committed by Martin K. Petersen
Browse files

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: default avatarChristos Gkekas <chris.gekas@gmail.com>
Acked-by: default avatarDon Brace <don.brace@microsemi.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 1010f21e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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(