From patchwork Sun Sep 29 02:29:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2959681 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 397149F244 for ; Sun, 29 Sep 2013 02:30:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 77C6320240 for ; Sun, 29 Sep 2013 02:30:13 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5512D2023F for ; Sun, 29 Sep 2013 02:30:12 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VQ6lc-0007n5-1l; Sun, 29 Sep 2013 02:29:52 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VQ6lZ-0006Hv-LW; Sun, 29 Sep 2013 02:29:49 +0000 Received: from mail-bk0-f53.google.com ([209.85.214.53]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VQ6lU-0006HD-T3 for linux-arm-kernel@lists.infradead.org; Sun, 29 Sep 2013 02:29:47 +0000 Received: by mail-bk0-f53.google.com with SMTP id d7so1532143bkh.12 for ; Sat, 28 Sep 2013 19:29:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=CfdGT2HIpY/ft0zXZdapIe0X25q+VMGc6nWomOG7I5g=; b=oyxcHrSvKQDeZ+VbQnZZctMXRCNlvubTv4EOXJ4tD1FK6unWNCUjmZIerQq3uN2r8b lunLYMM8b5+zwKYQ2VonGOitC6RaC77LK4oLl+Bi9WuVcmoZbMAcZvAPoWFe1X37FweT fy3O4htkHtTlZ6+n1huI5lxZ9sxZqXqZZrMkeveD5gCaNfnKBL5weohglYup1ygBx8co K0wKeGHpro+fM6yDBsj6uWGCVYtqAPszv+PxCU+932NIb8HQ/hsIoadpvgflFxtyVypF ZC/6bjUN/6VO3B8FOh8695jB0HqM98STJQXexFipKNwZ62lAvHBfk2b9xS1qFLt0Ej7Y 8fzg== MIME-Version: 1.0 X-Received: by 10.204.121.201 with SMTP id i9mr13007637bkr.13.1380421751575; Sat, 28 Sep 2013 19:29:11 -0700 (PDT) Received: by 10.205.13.74 with HTTP; Sat, 28 Sep 2013 19:29:11 -0700 (PDT) Date: Sun, 29 Sep 2013 10:29:11 +0800 Message-ID: Subject: [PATCH] PCI: exynos: missing clk_disable_unprepare() on error in exynos_pcie_probe() From: Wei Yongjun To: bhelgaas@google.com, kgene.kim@samsung.com, grant.likely@linaro.org, rob.herring@calxeda.com, jg1.han@samsung.com, tgih.jun@samsung.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130928_222945_056238_D85BED56 X-CRM114-Status: UNSURE ( 9.26 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) Cc: linux-pci@vger.kernel.org, yongjun_wei@trendmicro.com.cn, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Add the missing clk_disable_unprepare() before return from exynos_pcie_probe() in the error handling case. Signed-off-by: Wei Yongjun Acked-by: Jingoo Han --- drivers/pci/host/pci-exynos.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/pci/host/pci-exynos.c b/drivers/pci/host/pci-exynos.c index 94e096b..e25598a 100644 --- a/drivers/pci/host/pci-exynos.c +++ b/drivers/pci/host/pci-exynos.c @@ -487,18 +487,24 @@ static int __init exynos_pcie_probe(struct platform_device *pdev) elbi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0); exynos_pcie->elbi_base = devm_ioremap_resource(&pdev->dev, elbi_base); - if (IS_ERR(exynos_pcie->elbi_base)) - return PTR_ERR(exynos_pcie->elbi_base); + if (IS_ERR(exynos_pcie->elbi_base)) { + ret = PTR_ERR(exynos_pcie->elbi_base); + goto fail_bus_clk; + } phy_base = platform_get_resource(pdev, IORESOURCE_MEM, 1); exynos_pcie->phy_base = devm_ioremap_resource(&pdev->dev, phy_base); - if (IS_ERR(exynos_pcie->phy_base)) - return PTR_ERR(exynos_pcie->phy_base); + if (IS_ERR(exynos_pcie->phy_base)) { + ret = PTR_ERR(exynos_pcie->phy_base); + goto fail_bus_clk; + } block_base = platform_get_resource(pdev, IORESOURCE_MEM, 2); exynos_pcie->block_base = devm_ioremap_resource(&pdev->dev, block_base); - if (IS_ERR(exynos_pcie->block_base)) - return PTR_ERR(exynos_pcie->block_base); + if (IS_ERR(exynos_pcie->block_base)) { + ret = PTR_ERR(exynos_pcie->block_base); + goto fail_bus_clk; + } ret = add_pcie_port(pp, pdev); if (ret < 0)