summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2018-02-01 20:40:02 +0300
committerBjorn Helgaas <helgaas@kernel.org>2018-02-01 20:40:02 +0300
commit278a26b6e80417584541f0e4e82634b9b93b5ea2 (patch)
tree76292c2e84be89fc0f8f00542aab1660c5304f8e /drivers/pci
parent7dd113b7caf54b7c45a9627da5d6392784377e7c (diff)
parenteac56aa3bc8af3d9b9850345d0f2da9d83529134 (diff)
downloadlinux-278a26b6e80417584541f0e4e82634b9b93b5ea2.tar.xz
Merge remote-tracking branch 'lorenzo/pci/keystone' into next
* lorenzo/pci/keystone: PCI: keystone: Fix interrupt-controller-node lookup
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/dwc/pci-keystone.c5
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;