mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 02:04:19 +08:00
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:
commit
9627804be4
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user