From: James Smart Date: Mon, 1 Mar 2021 17:18:10 +0000 (-0800) Subject: scsi: lpfc: Fix status returned in lpfc_els_retry() error exit path X-Git-Tag: v5.12.3~228 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=823db6f1490e911a2a52bb47de68a06680ec887c;p=thirdparty%2Fkernel%2Fstable.git scsi: lpfc: Fix status returned in lpfc_els_retry() error exit path [ Upstream commit 148bc64d38fe314475a074c4f757ec9d84537d1c ] An unlikely error exit path from lpfc_els_retry() returns incorrect status to a caller, erroneously indicating that a retry has been successfully issued or scheduled. Change error exit path to indicate no retry. Link: https://lore.kernel.org/r/20210301171821.3427-12-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index f0a758138ae88..beb2fcd2d8e7b 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -3829,7 +3829,7 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, did = irsp->un.elsreq64.remoteID; ndlp = lpfc_findnode_did(vport, did); if (!ndlp && (cmd != ELS_CMD_PLOGI)) - return 1; + return 0; } lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_CMD,