From: James Smart Date: Wed, 16 Dec 2015 23:11:57 +0000 (-0500) Subject: lpfc: Fix crash in fcp command completion path. X-Git-Tag: v4.5-rc1~17^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c90261dcd86e4eb5c9c1627fde037e902db8aefa;p=platform%2Fkernel%2Flinux-exynos.git lpfc: Fix crash in fcp command completion path. Fix crash in fcp command completion path. Missed null check. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinicke Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 4679ed4..ab446f8 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -3908,9 +3908,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, uint32_t logit = LOG_FCP; /* Sanity check on return of outstanding command */ - if (!(lpfc_cmd->pCmd)) - return; cmd = lpfc_cmd->pCmd; + if (!cmd) + return; shost = cmd->device->host; lpfc_cmd->result = (pIocbOut->iocb.un.ulpWord[4] & IOERR_PARAM_MASK);