Skip to content

Commit

Permalink
scsi: lpfc: fix coverity error of dereference after null check
Browse files Browse the repository at this point in the history
Log message conditional upon vport being NULL dereferences vport to
determine log verbose setting.

Changed to use lpfc_print_log which uses phba to determine the active log
verbose setting.

Fixes: 43bfea1 ("scsi: lpfc: Fix coverity errors on NULL pointer checks")
Link: https://lore.kernel.org/r/20191018211832.7917-8-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
James Smart authored and Martin K. Petersen committed Oct 25, 2019
1 parent 91a52b6 commit f84f8f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/lpfc/lpfc_els.c
Original file line number Diff line number Diff line change
Expand Up @@ -4292,8 +4292,8 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
irsp = &rspiocb->iocb;

if (!vport) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
"3177 ELS response failed\n");
lpfc_printf_log(phba, KERN_ERR, LOG_ELS,
"3177 ELS response failed\n");
goto out;
}
if (cmdiocb->context_un.mbox)
Expand Down

0 comments on commit f84f8f9

Please sign in to comment.