diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2018-02-01 18:40:02 +0100 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-02-01 18:40:02 +0100 |
commit | 278a26b6e80417584541f0e4e82634b9b93b5ea2 (patch) | |
tree | 76292c2e84be89fc0f8f00542aab1660c5304f8e /drivers/pci/dwc | |
parent | Merge remote-tracking branch 'lorenzo/pci/endpoint' into next (diff) | |
parent | PCI: keystone: Fix interrupt-controller-node lookup (diff) | |
download | linux-278a26b6e80417584541f0e4e82634b9b93b5ea2.tar.xz linux-278a26b6e80417584541f0e4e82634b9b93b5ea2.zip |
Merge remote-tracking branch 'lorenzo/pci/keystone' into next
* lorenzo/pci/keystone:
PCI: keystone: Fix interrupt-controller-node lookup
Diffstat (limited to 'drivers/pci/dwc')
-rw-r--r-- | drivers/pci/dwc/pci-keystone.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/dwc/pci-keystone.c b/drivers/pci/dwc/pci-keystone.c index 5bee3af47588..39405598b22d 100644 --- a/drivers/pci/dwc/pci-keystone.c +++ b/drivers/pci/dwc/pci-keystone.c @@ -178,7 +178,7 @@ static int ks_pcie_get_irq_controller_info(struct keystone_pcie *ks_pcie, } /* interrupt controller is in a child node */ - *np_temp = of_find_node_by_name(np_pcie, controller); + *np_temp = of_get_child_by_name(np_pcie, controller); if (!(*np_temp)) { dev_err(dev, "Node for %s is absent\n", controller); return -EINVAL; @@ -187,6 +187,7 @@ static int ks_pcie_get_irq_controller_info(struct keystone_pcie *ks_pcie, temp = of_irq_count(*np_temp); if (!temp) { dev_err(dev, "No IRQ entries in %s\n", controller); + of_node_put(*np_temp); return -EINVAL; } @@ -204,6 +205,8 @@ static int ks_pcie_get_irq_controller_info(struct keystone_pcie *ks_pcie, break; } + of_node_put(*np_temp); + if (temp) { *num_irqs = temp; return 0; |