提交 4209ab09 编写于 作者: D David S. Miller

[SPARC64]: Check of_get_property() return in pci_determine_mem_io_space().

If the PCI controller lacks the 'ranges' property nothing
is going to work.

Noticed by Al Viro.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 719023fb
......@@ -396,6 +396,13 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
saw_mem = saw_io = 0;
pbm_ranges = of_get_property(pbm->prom_node, "ranges", &i);
if (!pbm_ranges) {
prom_printf("PCI: Fatal error, missing PBM ranges property "
" for %s\n",
pbm->name);
prom_halt();
}
num_pbm_ranges = i / sizeof(*pbm_ranges);
for (i = 0; i < num_pbm_ranges; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册