mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
[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>
This commit is contained in:
parent
d3c58fb177
commit
ccba051c37
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue