]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pci: Fix crash in PCI code on ppc64 when matching device nodes
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 20 Mar 2011 23:57:57 +0000 (10:57 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 20 Mar 2011 23:57:57 +0000 (10:57 +1100)
commit818c6e6f2ea9cd0c62f2781a772892e6b07516dd
tree9e962cdc2f11687751c8d37d74dad1abcd88e5e9
parent8c4203b5b1caa0eb6d9a5c32eb8fdb901a4cc1f7
powerpc/pci: Fix crash in PCI code on ppc64 when matching device nodes

Commit 0cbde5eb29118297f666e9b7e86ba2718b9d86a2 has a bug which causes
basically a NULL dereference in the PCI code during boot on ppc64
machines.

fetch_dev_dn() is called when dev->dev.of_node is NULL, so using that
as the starting point for the search makes no sense. It should instead
start from the device node of the PHB.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/pci_dn.c