From patchwork Fri Nov 25 09:27:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13055658 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56CE9C4167B for ; Fri, 25 Nov 2022 09:27:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229609AbiKYJ1X (ORCPT ); Fri, 25 Nov 2022 04:27:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229686AbiKYJ1U (ORCPT ); Fri, 25 Nov 2022 04:27:20 -0500 Received: from smtp.smtpout.orange.fr (smtp-27.smtpout.orange.fr [80.12.242.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C19532AC55 for ; Fri, 25 Nov 2022 01:27:18 -0800 (PST) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id yUzKo4Eiu1SdMyUzKoWrLE; Fri, 25 Nov 2022 10:27:16 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Fri, 25 Nov 2022 10:27:16 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-scsi@vger.kernel.org Subject: [PATCH] scsi: lpfc: Remove a useless variable Date: Fri, 25 Nov 2022 10:27:13 +0100 Message-Id: <0fa467c115ad75ba28959c909751abf2bfd2a30a.1669368420.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org 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 --- 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);