aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorDenis Kirjanov <dkirjanov@hera.kernel.org>2010-06-16 01:16:59 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-08 04:11:43 -0400
commitd3005fbc696781d2fd7bd5b5389a94fae5332b58 (patch)
tree1369363ca618ead993a57e2dd5aa5e67bc7bf251 /arch/powerpc/platforms
parent33ad5e4b6cab3ad8cf3afda49b66393f1833150e (diff)
powerpc/iseries: Fix possible null pointer dereference in iSeries_pcibios_fixup_resources
I don't know if this is a right fix for the problem since of_get_property can return NULL. Since iseries_device_information is used only for informational purpose, we can skip this function without valid HvSubBusNumber number. Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/iseries/pci.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index 3fc2e6494b8b..ab3962b0d246 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -445,7 +445,11 @@ void __init iSeries_pcibios_fixup_resources(struct pci_dev *pdev)
445 } 445 }
446 446
447 allocate_device_bars(pdev); 447 allocate_device_bars(pdev);
448 iseries_device_information(pdev, bus, *sub_bus); 448 if (likely(sub_bus))
449 iseries_device_information(pdev, bus, *sub_bus);
450 else
451 printk(KERN_ERR "PCI: Device node %s has missing or invalid "
452 "linux,subbus property\n", node->full_name);
449} 453}
450 454
451/* 455/*