diff options
author | James Smart <jsmart2021@gmail.com> | 2019-10-18 23:18:23 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-10-25 03:02:05 +0200 |
commit | f84f8f93f01feb64fdda8dd6c72d1b7dc24ad11d (patch) | |
tree | e3eb915cbf3b8138843a57bb67269da51324f81a /drivers | |
parent | scsi: lpfc: Fix hardlockup in lpfc_abort_handler (diff) | |
download | linux-f84f8f93f01feb64fdda8dd6c72d1b7dc24ad11d.tar.xz linux-f84f8f93f01feb64fdda8dd6c72d1b7dc24ad11d.zip |
scsi: lpfc: fix coverity error of dereference after null check
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: 43bfea1bffb6 ("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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index da90c7bf2287..2235a45999a8 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -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) |