Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1733068pxm; Thu, 24 Feb 2022 08:22:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyRgzr+fTrB6kdRLepESURF/IuS8YNGsgMppy6I9WCvSKNL/dllKbNGzu1HxoN4WL1bk3J4 X-Received: by 2002:a17:90a:4682:b0:1bc:236:7e46 with SMTP id z2-20020a17090a468200b001bc02367e46mr3512733pjf.212.1645719773519; Thu, 24 Feb 2022 08:22:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645719773; cv=none; d=google.com; s=arc-20160816; b=IhbL8ZyLNEhosJW7CVjU+Xk0+MtOolzNcbe94n3E7wp9B08VyBqd94SufibYH/kEzc YL54/hDjiQL2wFZIc0K2W1vpqLS2r1BYYX0c6YPmJv5PRF6faeBDYT/m6kzgwdccI319 YzVuVDhN9bzpMOHjMK0VnFRAmmVJz8yqLSWIb8VXZvAlCYpORVPkRUXjqQWDnbzV6iFS 2FJhxOeUf8t4gnoIG42bSsf1cJrLWUeFjE0o8a8Fv0SmQxUv0HsZWo4+W9fdcA0mUIeQ M6jaVqAgNDy7iJaAPTb9ecr43ktbsmHL9RpeMnRLoszeQblQIjaCBgne+uWzcceRqKUY kG2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Y27lafDUc10dOa5Z0gtlR0UDioeiPS86vzXMjIwF91Q=; b=lJcvwrAVtKPFn5jM3TqT6FbnN/OnvW8Lvs+AFpF6cOvxNmWqfzH9ZCcD5PT3XJUHn3 SxmMounyozYA68rIPuTmmiFfxV5vqjQhdLXQQCbhzYMj5/3GUMDn/5SCT5InZiylUt6+ Bn/VgSASRFa1soGzzBiy1tgHpnEpGMrYjZ1b2Hr4IA1uaex22nIX2M8eLDg0VsWmqSwu 16Wc8ur7Wzbv9RlxrOm6YhBajc4ujr6R1gbxBSsKD2NcoUnoCXPnkA15Pg4+5RUD4Rza iffNu+8Ujvf51S11lN01MXhzJ2+Pqx5JCtuy0eofyxgeFGPZ/AoXqIiu2MNjHsFDM0sY yDdA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g1si2765581pfv.141.2022.02.24.08.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 08:22:53 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3C1F018E424; Thu, 24 Feb 2022 08:13:01 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233193AbiBXL5r (ORCPT + 99 others); Thu, 24 Feb 2022 06:57:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234176AbiBXL5m (ORCPT ); Thu, 24 Feb 2022 06:57:42 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A300106B04; Thu, 24 Feb 2022 03:57:12 -0800 (PST) Received: from fraeml707-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4K4B904WSGz67wMm; Thu, 24 Feb 2022 19:52:20 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml707-chm.china.huawei.com (10.206.15.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 24 Feb 2022 12:57:10 +0100 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 24 Feb 2022 11:57:08 +0000 From: John Garry To: , CC: , , , Qi Liu , John Garry Subject: [PATCH 4/6] scsi: hisi_sas: Rename error labels in hisi_sas_v3_probe() Date: Thu, 24 Feb 2022 19:51:27 +0800 Message-ID: <1645703489-87194-5-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1645703489-87194-1-git-send-email-john.garry@huawei.com> References: <1645703489-87194-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Qi Liu To avoid doubt, rename the error labels to indicate the action they will take. Signed-off-by: Qi Liu Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 5b5557cab7ed..43d57b68c208 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -4723,7 +4723,7 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (!hisi_hba->regs) { dev_err(dev, "cannot map register\n"); rc = -ENOMEM; - goto err_out_ha; + goto err_out_free_host; } phy_nr = port_nr = hisi_hba->n_phy; @@ -4732,7 +4732,7 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id) arr_port = devm_kcalloc(dev, port_nr, sizeof(void *), GFP_KERNEL); if (!arr_phy || !arr_port) { rc = -ENOMEM; - goto err_out_ha; + goto err_out_free_host; } sha->sas_phy = arr_phy; @@ -4773,19 +4773,19 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id) rc = interrupt_preinit_v3_hw(hisi_hba); if (rc) - goto err_out_debugfs; + goto err_out_undo_debugfs; rc = scsi_add_host(shost, dev); if (rc) - goto err_out_debugfs; + goto err_out_undo_debugfs; rc = sas_register_ha(sha); if (rc) - goto err_out_register_ha; + goto err_out_remove_host; rc = hisi_sas_v3_init(hisi_hba); if (rc) - goto err_out_hw_init; + goto err_out_unregister_ha; scsi_scan_host(shost); @@ -4804,13 +4804,13 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id) return 0; -err_out_hw_init: +err_out_unregister_ha: sas_unregister_ha(sha); -err_out_register_ha: +err_out_remove_host: scsi_remove_host(shost); -err_out_debugfs: +err_out_undo_debugfs: debugfs_exit_v3_hw(hisi_hba); -err_out_ha: +err_out_free_host: hisi_sas_free(hisi_hba); scsi_host_put(shost); err_out: -- 2.26.2