Skip to contentSkip to conversation

scsi: hpsa: remove an unecessary NULL check

PATCH Applied Dan Carpenter 2 participants 3 messages Nov 7, 2017 – Nov 22, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: hpsa: remove an unecessary NULL check

device->scsi3addr[] is an array, not a pointer, so it can't be NULL. I've removed the check.

drivers/scsi/hpsa.c +0 -2
index 287e5eb0723f..b0aa5dc1d54c 100644
@@ -8223,8 +8223,6 @@ static void hpsa_set_ioaccel_status(struct ctlr_info *h)
 
 		if (!device)
 			continue;
-		if (!device->scsi3addr)
-			continue;
 		if (!hpsa_vpd_page_supported(h, device->scsi3addr,
 						HPSA_VPD_LV_IOACCEL_STATUS))
 			continue;
#1 lore raw
Quoted 3 lines

device->scsi3addr[] is an array, not a pointer, so it can't be NULL. I've removed the check.

Microsemi folks, please review. Thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#2 lore raw
In reply to Dan Carpenter

Dan,

Quoted 2 lines

device->scsi3addr[] is an array, not a pointer, so it can't be NULL. I've removed the check.

Applied to 4.16/scsi-queue. Thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering