diff mbox

scsi: hpsa: remove an unecessary NULL check

Message ID 20171107130131.3zohbeoobjxbqmdz@mwanda (mailing list archive)
State Accepted
Headers show

Commit Message

Dan Carpenter Nov. 7, 2017, 1:01 p.m. UTC
device->scsi3addr[] is an array, not a pointer, so it can't be NULL.
I've removed the check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Martin K. Petersen Nov. 21, 2017, 2:31 a.m. UTC | #1
> device->scsi3addr[] is an array, not a pointer, so it can't be NULL.
> I've removed the check.

Microsemi folks, please review. Thanks!
Martin K. Petersen Nov. 22, 2017, 3:59 a.m. UTC | #2
Dan,

> 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!
diff mbox

Patch

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 287e5eb0723f..b0aa5dc1d54c 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -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;