Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2651492pxv; Sun, 27 Jun 2021 04:47:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBNJsZmg6vEXW7qzzo88/cP1X97Yke3OXbE35dpGvHzOCvNa9Tj4hJQvOIgl9ZHqTsIb3b X-Received: by 2002:a17:906:7004:: with SMTP id n4mr12345750ejj.524.1624794475480; Sun, 27 Jun 2021 04:47:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624794475; cv=none; d=google.com; s=arc-20160816; b=nCpqmP3SQI+JaRqGxPekfID0m9z+lA32bvI8EGvdIt0vNpfW4H8HGCo696B0W9GRSs HWrTUDY6WbJXG638t3TDCEbSCUGc36lEBPcj/ccUSRr35DtlwXfOXXXQSg1/q6Az9AE5 opCPOPbHeIfmllTovioHKVGcnd5ykEYT7CfLm7ZjNHzOnQSgk326PZAOczjkvWaxanzH Ky90WNSLciJPBiW4Txd6uw8LOPkoQDpXv95oa6LihHEE7liBReV1kegVT9jlWbZJ2PXL +OnFLsLQy4C+w4Q/w4hBgYy9iBgIcAgun1nU4r+xtIvrjOGKMTVLnA6kWoVTGts+EXCb ORgg== 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=tdCzcFfR9l21bNm6PTelVTKaGQHAXRmJTrNWBVrTepA=; b=yQTuIA4EOO+e9O7hrexhLFe75qQRlJCwQ9B/eiwI/CuwHytChiT9BVHc6fAGgi6d7M o++faoY0gmPvPyxXG6nsjABa3Rpd8LosPrsGH/SAgjrcxr69HueBjkwmZeaHDe/DswDm kC/6DHSM1BLjW3trGLP8kFEigA7AcjYaqrDBS6JX9zZnytlGeDduvAhZZx3re12TvSQl YSpp2hAhRvHZetonM021Wh7dDQJEmtc0LxUa+Bp/rhly5BNBo+WKbXNjHEWpU61LuJr3 v0b6UHi/sMaGNgQmfE1wgX5+5kjEgQfUVZpT0z4VakOk9KeNgMKy2VZrhD09ZI9zc5nI xFPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hu7si11563087ejc.142.2021.06.27.04.47.31; Sun, 27 Jun 2021 04:47:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229880AbhF0Ls7 (ORCPT + 99 others); Sun, 27 Jun 2021 07:48:59 -0400 Received: from smtp03.smtpout.orange.fr ([80.12.242.125]:58728 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229820AbhF0Ls6 (ORCPT ); Sun, 27 Jun 2021 07:48:58 -0400 Received: from localhost.localdomain ([86.243.172.93]) by mwinf5d79 with ME id NBmT2500921Fzsu03BmToT; Sun, 27 Jun 2021 13:46:33 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 27 Jun 2021 13:46:33 +0200 X-ME-IP: 86.243.172.93 From: Christophe JAILLET To: kishon@ti.com, tjoseph@cadence.com, lorenzo.pieralisi@arm.com, robh@kernel.org, kw@linux.com, bhelgaas@google.com Cc: linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] PCI: j721e: Fix an error handling path in 'j721e_pcie_probe()' Date: Sun, 27 Jun 2021 13:46:24 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If an error occurs after a successful 'cdns_pcie_init_phy()' call, it must be undone by a 'cdns_pcie_disable_phy()' call, as already done above and below. Update the 'goto' to branch at the correct place of the error handling path. Fixes: 49e0efdce791 ("PCI: j721e: Add support to provide refclk to PCIe connector") Signed-off-by: Christophe JAILLET --- drivers/pci/controller/cadence/pci-j721e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c index 35e61048e133..8933db6ab1af 100644 --- a/drivers/pci/controller/cadence/pci-j721e.c +++ b/drivers/pci/controller/cadence/pci-j721e.c @@ -424,7 +424,7 @@ static int j721e_pcie_probe(struct platform_device *pdev) ret = clk_prepare_enable(clk); if (ret) { dev_err(dev, "failed to enable pcie_refclk\n"); - goto err_get_sync; + goto err_pcie_setup; } pcie->refclk = clk; -- 2.30.2