diff options
author | 2017-09-07 13:23:53 -0500 | |
---|---|---|
committer | 2017-09-07 13:23:53 -0500 | |
commit | 9627804be4c17149e2c78c96b8307d27eb8992dc (patch) | |
tree | 3258d298d4804ec6d62af0d29fd56c9ed819edb0 /drivers/pci | |
parent | Merge branch 'pci/host-altera' into next (diff) | |
parent | PCI: armada8k: Fix platform_get_irq() error handling (diff) | |
download | linux-9627804be4c17149e2c78c96b8307d27eb8992dc.tar.gz linux-9627804be4c17149e2c78c96b8307d27eb8992dc.tar.bz2 linux-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.c | 8 |
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"); |