scsi: lpfc: code cleanups in NVME initiator discovery
authorJames Smart <jsmart2021@gmail.com>
Sat, 4 Mar 2017 17:30:39 +0000 (09:30 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 7 Mar 2017 04:04:23 +0000 (23:04 -0500)
commitb5ccc7d61c76006f839b41c6f15876342b46cb02
treebaf5ab13c443e3470412c8d4f0fa110b3310159e
parent2ade92ae6d6572858acb2bde6d3664af3ad592e2
scsi: lpfc: code cleanups in NVME initiator discovery

This patch addresses the smatch issues identified by Dan Carpenter
in http://www.spinics.net/lists/linux-scsi/msg105665.html

The issues are:

drivers/scsi/lpfc/lpfc_ct.c:943 lpfc_cmpl_ct_cmd_gft_id()
error: we previously assumed 'ndlp' could be null (see line 928)

Action: moved under if check

drivers/scsi/lpfc/lpfc_nvmet.c:1694 lpfc_nvmet_unsol_issue_abort()
error: we previously assumed 'ndlp' could be null (see line 1690)

Action: conditionalized arg in printf stmt

drivers/scsi/lpfc/lpfc_nvmet.c:1792 lpfc_nvmet_sol_fcp_issue_abort()
error: we previously assumed 'ndlp' could be null (see line 1788)

Action: conditionalized arg in printf stmt

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_ct.c
drivers/scsi/lpfc/lpfc_nvmet.c