Merge branch 'pci/host-armada' into next

* pci/host-armada:
  PCI: armada8k: Fix platform_get_irq() error handling
  PCI: armada8k: Check the return value from clk_prepare_enable()
This commit is contained in:
Bjorn Helgaas 2017-09-07 13:23:53 -05:00
commit 9627804be4

View File

@ -176,9 +176,9 @@ static int armada8k_add_pcie_port(struct armada8k_pcie *pcie,
pp->ops = &armada8k_pcie_host_ops;
pp->irq = platform_get_irq(pdev, 0);
if (!pp->irq) {
if (pp->irq < 0) {
dev_err(dev, "failed to get irq for port\n");
return -ENODEV;
return pp->irq;
}
ret = devm_request_irq(dev, pp->irq, armada8k_pcie_irq_handler,
@ -226,7 +226,9 @@ static int armada8k_pcie_probe(struct platform_device *pdev)
if (IS_ERR(pcie->clk))
return PTR_ERR(pcie->clk);
clk_prepare_enable(pcie->clk);
ret = clk_prepare_enable(pcie->clk);
if (ret)
return ret;
/* Get the dw-pcie unit configuration/control registers base. */
base = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl");