diff options
author | James Smart <james.smart@emulex.com> | 2014-09-03 20:57:55 +0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-09-16 20:10:12 +0400 |
commit | a2fc4aefa06d8b57b6728c1787c84fb3d3c86354 (patch) | |
tree | c7833b3e44299747314298646b5d8fa0e8bf5eb6 /drivers/scsi/lpfc/lpfc_els.c | |
parent | 7ba36effb666831ac3803ca5b8aed371e7d17c4e (diff) | |
download | linux-a2fc4aefa06d8b57b6728c1787c84fb3d3c86354.tar.xz |
lpfc: fix high priority issues from fortify source code scan
Fixed High priority issues from lpfc given by fortify source code scan.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 9d03e7250fb4..c7e508085413 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1084,7 +1084,8 @@ stop_rr_fcf_flogi: * accessing it. */ prsp = list_get_first(&pcmd->list, struct lpfc_dmabuf, list); - + if (!prsp) + goto out; sp = prsp->virt + sizeof(uint32_t); /* FLOGI completes successfully */ @@ -7521,6 +7522,8 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, vport->fc_myDID = irsp->un.ulpWord[4] & Mask_DID; lpfc_vport_set_state(vport, FC_VPORT_ACTIVE); prsp = list_get_first(&pcmd->list, struct lpfc_dmabuf, list); + if (!prsp) + goto out; sp = prsp->virt + sizeof(uint32_t); fabric_param_changed = lpfc_check_clean_addr_bit(vport, sp); memcpy(&vport->fabric_portname, &sp->portName, |