提交 ccba051c 编写于 作者: N Nathan Lynch 提交者: Paul Mackerras

[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: NNathan Lynch <ntl@pobox.com>
Signed-off-by: NAnton Blanchard <anton@samba.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 d3c58fb1
......@@ -304,6 +304,8 @@ void __init pci_addr_cache_build(void)
pci_addr_cache_insert_device(dev);
dn = pci_device_to_OF_node(dev);
if (!dn)
continue;
pci_dev_get (dev); /* matching put is in eeh_remove_device() */
PCI_DN(dn)->pcidev = dev;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册