diff options
author | Nathan Lynch <ntl@pobox.com> | 2006-06-20 04:01:58 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-06-21 01:01:33 -0400 |
commit | ccba051c373e342de240ba00d542dac67ae0eb7e (patch) | |
tree | 7ee4bcffa4b500e916a3abc3a036954e73233bf1 /arch/powerpc | |
parent | d3c58fb177dc957af5cdac5ad1638d713fdb8765 (diff) |
[POWERPC] Extra sanity check in EEH code
Don't dereference a device node that isn't there. A "shouldn't
happen" case, but someone ran into it with a possibly misconfigured
device tree.
Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh_cache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh_cache.c b/arch/powerpc/platforms/pseries/eeh_cache.c index d4a402c5866c..98c23aec85be 100644 --- a/arch/powerpc/platforms/pseries/eeh_cache.c +++ b/arch/powerpc/platforms/pseries/eeh_cache.c | |||
@@ -304,6 +304,8 @@ void __init pci_addr_cache_build(void) | |||
304 | pci_addr_cache_insert_device(dev); | 304 | pci_addr_cache_insert_device(dev); |
305 | 305 | ||
306 | dn = pci_device_to_OF_node(dev); | 306 | dn = pci_device_to_OF_node(dev); |
307 | if (!dn) | ||
308 | continue; | ||
307 | pci_dev_get (dev); /* matching put is in eeh_remove_device() */ | 309 | pci_dev_get (dev); /* matching put is in eeh_remove_device() */ |
308 | PCI_DN(dn)->pcidev = dev; | 310 | PCI_DN(dn)->pcidev = dev; |
309 | } | 311 | } |