[PATCH] scsi: lpfc: Remove a useless variable

From: Christophe JAILLET
Date: Fri Nov 25 2022 - 04:27:26 EST


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@xxxxxxxxxx>
---
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