OSDN Git Service

PCI: keystone: Fix interrupt-controller-node lookup
authorJohan Hovold <johan@kernel.org>
Fri, 17 Nov 2017 13:38:31 +0000 (14:38 +0100)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 19 Dec 2017 11:06:04 +0000 (11:06 +0000)
commiteac56aa3bc8af3d9b9850345d0f2da9d83529134
tree41230904dedad125a782448d0e9c0d0d08c03993
parent1291a0d5049dbc06baaaf66a9ff3f53db493b19b
PCI: keystone: Fix interrupt-controller-node lookup

Fix child-node lookup during initialisation which was using the wrong
OF-helper and ended up searching the whole device tree depth-first
starting at the parent rather than just matching on its children.

To make things worse, the parent pci node could end up being prematurely
freed as of_find_node_by_name() drops a reference to its first argument.
Any matching child interrupt-controller node was also leaked.

Fixes: 0c4ffcfe1fbc ("PCI: keystone: Add TI Keystone PCIe driver")
Cc: stable <stable@vger.kernel.org> # 3.18
Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
[lorenzo.pieralisi@arm.com: updated commit subject]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/dwc/pci-keystone.c