lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <0fa467c115ad75ba28959c909751abf2bfd2a30a.1669368420.git.christophe.jaillet@wanadoo.fr>
Date:   Fri, 25 Nov 2022 10:27:13 +0100
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     James Smart <james.smart@...adcom.com>,
        Dick Kennedy <dick.kennedy@...adcom.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>
Cc:     linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        linux-scsi@...r.kernel.org
Subject: [PATCH] scsi: lpfc: Remove a useless variable

There is no point in using 'error' here. All other paths use 'rc'.
So use it here as well and remove the 'error' variable.

Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
 drivers/scsi/lpfc/lpfc_init.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 25ba20e42825..6e85af92fb01 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -4700,7 +4700,6 @@ lpfc_create_port(struct lpfc_hba *phba, int instance, struct device *dev)
 	struct lpfc_vport *vport;
 	struct Scsi_Host  *shost = NULL;
 	struct scsi_host_template *template;
-	int error = 0;
 	int i;
 	uint64_t wwn;
 	bool use_no_reset_hba = false;
@@ -4829,8 +4828,8 @@ lpfc_create_port(struct lpfc_hba *phba, int instance, struct device *dev)
 	if (phba->sli3_options & LPFC_SLI3_BG_ENABLED)
 		lpfc_setup_bg(phba, shost);
 
-	error = scsi_add_host_with_dma(shost, dev, &phba->pcidev->dev);
-	if (error)
+	rc = scsi_add_host_with_dma(shost, dev, &phba->pcidev->dev);
+	if (rc)
 		goto out_free_vmid;
 
 	spin_lock_irq(&phba->port_list_lock);
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ