pci_dma_bus_setup_pSeries() should use of_get_next_child() to safely iterate through the nodes children.
Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]> --- arch/powerpc/platforms/pseries/iommu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index ef1aa8d..1a9e14f 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -343,7 +343,7 @@ static void pci_dma_bus_setup_pSeries(struct pci_bus *bus) of_node_put(isa_dn); /* Count number of direct PCI children of the PHB. */ - for (children = 0, tmp = dn->child; tmp; tmp = tmp->sibling) + for (children = 0, tmp = NULL; (tmp = of_get_next_child(dn, tmp));) children++; DBG("Children: %d\n", children); -- 1.5.2.rc1.1884.g59b20 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev