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