From patchwork Thu Jun 15 12:14:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13281201 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BD6D5EB64DB for ; Thu, 15 Jun 2023 12:15:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GV5y7b3GuSyE3quvHeavhTGA0Cq6Ny8ij1qFoevB1hI=; b=TrnEiPiew9L/i2 4zg9P7zjax/yAXUZPCdK6mGLJaar1gp0wPj2PvyjpsXT/2c0HLkiy/ua1PqXfUF7naSTTzNF62myq 1H5gbXCuFzJJyFNLeym/CrIp99tuP6cmsEAXyvzMr3JJ0Wlu61nfNgTq/a1uAwDXtgrT+lOM6ulh0 4r4hm42WVJBK6X6JJ67GhVTUWI516pCUmZhncZkIP/IrVwlq6H/oyxypWIdKbLw7gmjBWqYqb2GE7 prD9V4N0MSSvoM1/8CiQK+qju+AglrGAJFh32iseUxekJC6IeMaMyNuVUyjj1W4MHUUBFDDvh8fEl kSN5fCV5WQ6MXz8E2eBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9lsk-00EpTK-2z; Thu, 15 Jun 2023 12:15:18 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q9lsB-00Ep03-2A for linux-arm-kernel@lists.infradead.org; Thu, 15 Jun 2023 12:14:46 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3f8d5262dc8so5675925e9.0 for ; Thu, 15 Jun 2023 05:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1686831281; x=1689423281; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kqkS8wBl8PLRWJLFm1wypKtzLGR0zlssSDIjkM/ys4k=; b=i7O7EvVVvTHb8NTsIem/WZeN+QevE1moTxfz0yrSMFq7xKbW/90oxgqty8DCSed4KT Fmh3Q5kGqEM+07cEQJIYL2FkA1Fz6Jbq/fgxnUBL1QZ2nCM5gQE8U4fOTxhb3Fa3TLLy kEt+ww2DIaCemE7ATvfTqGkoUaz3EVxUhD1Q32FJ7nMyo1FU94RX5TGh366L8c7oYuZ5 1w3yKzxCeIMnkrvd/DFqU9JvgRSW/kPAmXUmz2X/Qh3nSjT4jYDhuiqIZgBD4+pt/6E3 jaShgq9ke2fgWBbA0nK3z0JtBupXJuvjOSJrkU6cFrlfKe2/xxyOyq5pSEr3XtCKsYLb 3DAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686831281; x=1689423281; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kqkS8wBl8PLRWJLFm1wypKtzLGR0zlssSDIjkM/ys4k=; b=CQ0gej2DnPsaBNOLgRTereQJrIKTKLuGFzcO4nUEMlcT26UQc21sfXkTyOW9ARCkM4 5/jVDUUeQDiGJ202+OMiKJi3ObFlVlNfqp8aIPHcMNQS+Dfq1esNPAhUUnK+wOl8PZxD 5A8T3u+mJ774FILI+YwtcP4zzIbk2ZodrQ8zsqcJMesHTug4zrUveeVtPEYSxzQQgJVk jg6/mh5K0DZ0OtRygKuPfvKa2RLyDHJ/1R/RuG6TKyGQCjGAt1GELLy/04uGC183KUWH ysLUJZH0Pi9xz0HCkZHvHepbzfSs5qZVleGgVpuYB+lGUzpuWmc7ZXmWfIG0vALRk93e /7mg== X-Gm-Message-State: AC+VfDwFSif1ZWHrBgyEDNHNtJOOFO42hzS86mjFZ7NKczrOep6QQG2f MIlMoV51HFgnUspXyMW1iT1/Sw== X-Google-Smtp-Source: ACHHUZ7sMlh6F/QZYZCv/KzWh3NwmaWztRFcznydyaXLXCBeKYCst66Hp1J7muiitR1gAmf6u37luQ== X-Received: by 2002:a05:600c:3659:b0:3f7:aee8:c23a with SMTP id y25-20020a05600c365900b003f7aee8c23amr4005824wmq.19.1686831280870; Thu, 15 Jun 2023 05:14:40 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:2ad4:65a7:d9f3:a64e]) by smtp.gmail.com with ESMTPSA id k17-20020a5d4291000000b003047ea78b42sm20918012wrq.43.2023.06.15.05.14.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 05:14:40 -0700 (PDT) From: Bartosz Golaszewski To: Vinod Koul , Bhupesh Sharma , Andy Gross , Bjorn Andersson , Konrad Dybcio , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kishon Vijay Abraham I , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu Cc: netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Bartosz Golaszewski , Andrew Halaney Subject: [PATCH v2 06/23] net: stmmac: dwmac-qcom-ethqos: rename a label in probe() Date: Thu, 15 Jun 2023 14:14:02 +0200 Message-Id: <20230615121419.175862-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230615121419.175862-1-brgl@bgdev.pl> References: <20230615121419.175862-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230615_051443_752891_351D02A5 X-CRM114-Status: GOOD ( 12.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Bartosz Golaszewski The err_mem label's name is unclear. It actually should be reached on any error after stmmac_probe_config_dt() succeeds. Name it after the cleanup action that needs to be called before exiting. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Halaney --- .../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index 2da0738eed24..16e856861558 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -615,14 +615,14 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ethqos = devm_kzalloc(&pdev->dev, sizeof(*ethqos), GFP_KERNEL); if (!ethqos) { ret = -ENOMEM; - goto err_mem; + goto out_config_dt; } ethqos->pdev = pdev; ethqos->rgmii_base = devm_platform_ioremap_resource_byname(pdev, "rgmii"); if (IS_ERR(ethqos->rgmii_base)) { ret = PTR_ERR(ethqos->rgmii_base); - goto err_mem; + goto out_config_dt; } data = of_device_get_match_data(&pdev->dev); @@ -634,16 +634,16 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ethqos->rgmii_clk = devm_clk_get(&pdev->dev, "rgmii"); if (IS_ERR(ethqos->rgmii_clk)) { ret = PTR_ERR(ethqos->rgmii_clk); - goto err_mem; + goto out_config_dt; } ret = ethqos_clks_config(ethqos, true); if (ret) - goto err_mem; + goto out_config_dt; ret = devm_add_action_or_reset(&pdev->dev, ethqos_clks_disable, ethqos); if (ret) - goto err_mem; + goto out_config_dt; ethqos->speed = SPEED_1000; ethqos_update_rgmii_clk(ethqos, SPEED_1000); @@ -662,11 +662,11 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); if (ret) - goto err_mem; + goto out_config_dt; return ret; -err_mem: +out_config_dt: stmmac_remove_config_dt(pdev, plat_dat); return ret;