Skip to content

Commit

Permalink
Merge branch 'pci/pci/ftpci100'
Browse files Browse the repository at this point in the history
- Release clock resources on error paths (Junyan Ye)

* pci/pci/ftpci100:
  PCI: ftpci100: Release the clock resources
  • Loading branch information
Bjorn Helgaas committed Jun 26, 2023
2 parents 99f7b80 + c60738d commit 69fa3ef
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions drivers/pci/controller/pci-ftpci100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 69fa3ef

Please sign in to comment.