The extraction of PCI stuff from struct device_node left some false
assumptions in notifier code.  As a result, dynamic add crashes when
non-PCI nodes are added.  This patch fixes these assumptions.
Signed-off-by: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
 
        switch (action) {
        case PSERIES_RECONFIG_REMOVE:
-               if (pci->iommu_table &&
+               if (pci && pci->iommu_table &&
                    get_property(np, "ibm,dma-window", NULL))
                        iommu_free_table(np);
                break;
 
 static int pci_dn_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node)
 {
        struct device_node *np = node;
-       struct pci_dn *pci;
+       struct pci_dn *pci = NULL;
        int err = NOTIFY_OK;
 
        switch (action) {
        case PSERIES_RECONFIG_ADD:
                pci = np->parent->data;
-               update_dn_pci_info(np, pci->phb);
+               if (pci)
+                       update_dn_pci_info(np, pci->phb);
                break;
        default:
                err = NOTIFY_DONE;