summaryrefslogtreecommitdiffstats
path: root/arch/ppc64
diff options
context:
space:
mode:
authorJohn Rose <johnrose@austin.ibm.com>2005-11-02 10:29:55 -0600
committerPaul Mackerras <paulus@samba.org>2005-11-03 16:53:49 +1100
commit8902e87f1fc72740a40686a31ca07e6c2cf1f0f2 (patch)
tree17d6fa17cbf41c5eda3d79696e77f9a69fa0b51a /arch/ppc64
parentf4fcbbe9a7fdf11305fea657202b954bdc2228ec (diff)
downloadblackbird-op-linux-8902e87f1fc72740a40686a31ca07e6c2cf1f0f2.tar.gz
blackbird-op-linux-8902e87f1fc72740a40686a31ca07e6c2cf1f0f2.zip
[PATCH] ppc64: Fix add notifier crashes
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>
Diffstat (limited to 'arch/ppc64')
-rw-r--r--arch/ppc64/kernel/pci_dn.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/ppc64/kernel/pci_dn.c b/arch/ppc64/kernel/pci_dn.c
index 493bbe43f5b4..1a443a7ada4c 100644
--- a/arch/ppc64/kernel/pci_dn.c
+++ b/arch/ppc64/kernel/pci_dn.c
@@ -181,13 +181,14 @@ EXPORT_SYMBOL(fetch_dev_dn);
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;
OpenPOWER on IntegriCloud