aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2017-09-07 13:23:53 -0500
committerBjorn Helgaas <bhelgaas@google.com>2017-09-07 13:23:53 -0500
commit9627804be4c17149e2c78c96b8307d27eb8992dc (patch)
tree3258d298d4804ec6d62af0d29fd56c9ed819edb0 /drivers/pci
parentMerge branch 'pci/host-altera' into next (diff)
parentPCI: armada8k: Fix platform_get_irq() error handling (diff)
downloadlinux-dev-9627804be4c17149e2c78c96b8307d27eb8992dc.tar.xz
linux-dev-9627804be4c17149e2c78c96b8307d27eb8992dc.zip
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()
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/dwc/pcie-armada8k.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/pci/dwc/pcie-armada8k.c b/drivers/pci/dwc/pcie-armada8k.c
index ea8f34af6a85..8047686c3856 100644
--- a/drivers/pci/dwc/pcie-armada8k.c
+++ b/drivers/pci/dwc/pcie-armada8k.c
@@ -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");