]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
PCI: exynos: Add missing clk_disable_unprepare() on error path
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Sun, 29 Sep 2013 02:29:11 +0000 (10:29 +0800)
committerRichard Zhu <r65037@freescale.com>
Wed, 20 Nov 2013 06:10:29 +0000 (14:10 +0800)
Add the missing clk_disable_unprepare() before return
from exynos_pcie_probe() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
drivers/pci/host/pci-exynos.c

index 15ddd15cd680c4448b741a02999a92c3b84ee924..e43bd1fac804077111f3d3e3b16637f11a106adc 100644 (file)
@@ -577,18 +577,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)