Commit 889cda36 authored by Kevin Barnett's avatar Kevin Barnett Committed by Martin K. Petersen
Browse files

scsi: smartpqi: Remove NULL pointer check



Remove an unnecessary check for a NULL pointer.  This unnecessary check was
flagged by Coverity.

Reviewed-by: default avatarScott Benesh <scott.benesh@microchip.com>
Reviewed-by: default avatarScott Teel <scott.teel@microchip.com>
Reviewed-by: default avatarMike McGowen <mike.mcgowen@microchip.com>
Signed-off-by: default avatarKevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: default avatarDon Brace <don.brace@microchip.com>
Link: https://lore.kernel.org/r/20230428153712.297638-4-don.brace@microchip.com


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent fe0375d4
Loading
Loading
Loading
Loading
+13 −15
Original line number Diff line number Diff line
@@ -92,12 +92,11 @@ static int pqi_sas_port_add_rphy(struct pqi_sas_port *pqi_sas_port,

	identify = &rphy->identify;
	identify->sas_address = pqi_sas_port->sas_address;
	identify->phy_identifier = pqi_sas_port->device->phy_id;

	identify->initiator_port_protocols = SAS_PROTOCOL_ALL;
	identify->target_port_protocols = SAS_PROTOCOL_STP;

	if (pqi_sas_port->device) {
		identify->phy_identifier = pqi_sas_port->device->phy_id;
	switch (pqi_sas_port->device->device_type) {
	case SA_DEVICE_TYPE_SAS:
	case SA_DEVICE_TYPE_SES:
@@ -111,7 +110,6 @@ static int pqi_sas_port_add_rphy(struct pqi_sas_port *pqi_sas_port,
	default:
		break;
	}
	}

	return sas_rphy_add(rphy);
}