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: 25896 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3880796wrr; Fri, 25 Nov 2022 01:30:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf7y4pX5sWinHiwBBoxUXZbR+4xr062UIUU4/EyinZFDWTcn9OIIUqVg885MWiICe1pmJ2pY X-Received: by 2002:a63:e042:0:b0:477:d9ee:bd35 with SMTP id n2-20020a63e042000000b00477d9eebd35mr3837743pgj.18.1669368657222; Fri, 25 Nov 2022 01:30:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669368657; cv=none; d=google.com; s=arc-20160816; b=n5W1s6JpU9b/NVQatsE+sN2+N6YyLz51AWw9nL3v53MdR8gYbWqO+BIbIE2UO9DBow d3hLC5IhGrHjsrHtcaoLd96+okNI+T8laZesokibV076mf5xzbD5I7KCE9aFwJS7ZJBV jr9ZuUOZLefNf5C1Pmettj3tgozIN7HC43TODGKBUh5x+TFc1bOB3Dx3xk+lQYbYtxVq oxAC3KBM8+j8gyr9WujWv9o4znmOSFxbyUEDC1n9wghpCcJKMIijDJywdrnO3JKFyEBX fOO4io12m97+MTRlY6UORVpCy5Da60iTLB0iOqe4mpBnaeFBt3fpLdFnhfAX3eq8tnoO k1jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=TyuKi6xmpV8MH0v2rFOMT8la2kuy8vdulBk14vsZbqs=; b=CCeIwcbbiEv1bEVLG0cRJ40ZXtgB9fm/oqCQf5YarAa4R1CPPl6fjx5YZLLpQBFFGR OmAVNSuY4REUoAVsBTYM/WmAP6g+YkL26RGQGJZGHbQJ+xS4IDcmB8KLfloBxusk8XRg rkrObq/hLW5dbj9DDY8QrN1+dKc7r8nTHs2j5czLHTDLzKs8TclbbLcKxTdrCvhW6sk3 hizJhbUHBMthsgMq1DfBxqEOdRC6ma9eqCVxUqr+Vf2T8fOZmNH5iGA78Ptw/7D4pCfa 4wC8gt7wdqOoWl29XyNN9TkM9+XiroClXoE6smHYEMZx2GQCZ+IgLweHT+YzdzaDQU73 bm3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d192-20020a6336c9000000b00476dc18e732si3686398pga.726.2022.11.25.01.30.43; Fri, 25 Nov 2022 01:30:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229819AbiKYJ1X (ORCPT + 99 others); Fri, 25 Nov 2022 04:27:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229627AbiKYJ1U (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 C1A052AC6B 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750459908778403261?= X-GMAIL-MSGID: =?utf-8?q?1750459908778403261?= 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);