diff mbox series

scsi: lpfc: Remove a useless variable

Message ID 0fa467c115ad75ba28959c909751abf2bfd2a30a.1669368420.git.christophe.jaillet@wanadoo.fr (mailing list archive)
State New, archived
Headers show
Series scsi: lpfc: Remove a useless variable | expand

Commit Message

Christophe JAILLET Nov. 25, 2022, 9:27 a.m. UTC
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@wanadoo.fr>
---
 drivers/scsi/lpfc/lpfc_init.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

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);