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: 2959671 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@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 BC56C9F244 for ; Sun, 29 Sep 2013 02:29:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB78E2023F for ; Sun, 29 Sep 2013 02:29:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C80520249 for ; Sun, 29 Sep 2013 02:29:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753564Ab3I2C3O (ORCPT ); Sat, 28 Sep 2013 22:29:14 -0400 Received: from mail-bk0-f49.google.com ([209.85.214.49]:62186 "EHLO mail-bk0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753466Ab3I2C3N (ORCPT ); Sat, 28 Sep 2013 22:29:13 -0400 Received: by mail-bk0-f49.google.com with SMTP id r7so1488110bkg.8 for ; Sat, 28 Sep 2013 19:29:11 -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 Cc: yongjun_wei@trendmicro.com.cn, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)