diff options
author | Linas Vepstas <linas@linas.org> | 2005-11-03 19:51:17 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-10 00:02:35 -0500 |
commit | fe98aeab8494cf431ef62e080cbe1dc1b6f5bd49 (patch) | |
tree | a0a66f8a8de8115d7310c4e9821f04194173987b /drivers | |
parent | d9564ad11454581f85b77026f290f4bb24eecf25 (diff) |
[PATCH] ppc64: bugfix: crash on PHB add
19-rpaphp-crashing.patch
This patch fixes a bug related to dlpar PHB add, after a PHB removal.
-- The crash was due to the PHB not having a pci_dn structure yet,
when the phb is being added.
This code survived testing, of adding and removeig the PHB and all slots
underneath it, 17 times so far, as of this writing.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/hotplug/rpadlpar_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c index fcb66b9a0e28..e8593a60ee89 100644 --- a/drivers/pci/hotplug/rpadlpar_core.c +++ b/drivers/pci/hotplug/rpadlpar_core.c | |||
@@ -306,7 +306,7 @@ static int dlpar_add_phb(char *drc_name, struct device_node *dn) | |||
306 | { | 306 | { |
307 | struct pci_controller *phb; | 307 | struct pci_controller *phb; |
308 | 308 | ||
309 | if (PCI_DN(dn)->phb) { | 309 | if (PCI_DN(dn) && PCI_DN(dn)->phb) { |
310 | /* PHB already exists */ | 310 | /* PHB already exists */ |
311 | return -EINVAL; | 311 | return -EINVAL; |
312 | } | 312 | } |