aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas2023-06-26 12:59:58 -0500
committerBjorn Helgaas2023-06-26 12:59:58 -0500
commit69fa3ef3d2699acdf0ac917cc070c0e9cfd61b74 (patch)
tree8d813195b418c2ef4e02b5bca56706b4b2d28fca /drivers/pci
parent99f7b809067be43141027f4bbb6af7b55f854554 (diff)
parentc60738de85f40b0b9f5cb23c21f9246e5a47908c (diff)
Merge branch 'pci/pci/ftpci100'
- Release clock resources on error paths (Junyan Ye) * pci/pci/ftpci100: PCI: ftpci100: Release the clock resources
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/controller/pci-ftpci100.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/pci/controller/pci-ftpci100.c b/drivers/pci/controller/pci-ftpci100.c
index ecd3009df586..6e7981d2ed5e 100644
--- a/drivers/pci/controller/pci-ftpci100.c
+++ b/drivers/pci/controller/pci-ftpci100.c
@@ -429,22 +429,12 @@ static int faraday_pci_probe(struct platform_device *pdev)
p->dev = dev;
/* Retrieve and enable optional clocks */
- clk = devm_clk_get(dev, "PCLK");
+ clk = devm_clk_get_enabled(dev, "PCLK");
if (IS_ERR(clk))
return PTR_ERR(clk);
- ret = clk_prepare_enable(clk);
- if (ret) {
- dev_err(dev, "could not prepare PCLK\n");
- return ret;
- }
- p->bus_clk = devm_clk_get(dev, "PCICLK");
+ p->bus_clk = devm_clk_get_enabled(dev, "PCICLK");
if (IS_ERR(p->bus_clk))
return PTR_ERR(p->bus_clk);
- ret = clk_prepare_enable(p->bus_clk);
- if (ret) {
- dev_err(dev, "could not prepare PCICLK\n");
- return ret;
- }
p->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(p->base))