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>
This commit is contained in:
Denis Kirjanov 2010-06-16 05:16:59 +00:00 committed by Benjamin Herrenschmidt
parent 33ad5e4b6c
commit d3005fbc69

View File

@ -445,7 +445,11 @@ void __init iSeries_pcibios_fixup_resources(struct pci_dev *pdev)
}
allocate_device_bars(pdev);
if (likely(sub_bus))
iseries_device_information(pdev, bus, *sub_bus);
else
printk(KERN_ERR "PCI: Device node %s has missing or invalid "
"linux,subbus property\n", node->full_name);
}
/*