|
@@ -220,7 +220,8 @@ static struct device_node *find_pe_dn(struct pci_dev *dev, int *total)
|
|
|
|
|
|
/* Get the top level device in the PE */
|
|
/* Get the top level device in the PE */
|
|
edev = of_node_to_eeh_dev(dn);
|
|
edev = of_node_to_eeh_dev(dn);
|
|
- edev = list_first_entry(&edev->pe->edevs, struct eeh_dev, list);
|
|
|
|
|
|
+ if (edev->pe)
|
|
|
|
+ edev = list_first_entry(&edev->pe->edevs, struct eeh_dev, list);
|
|
dn = eeh_dev_to_of_node(edev);
|
|
dn = eeh_dev_to_of_node(edev);
|
|
if (!dn)
|
|
if (!dn)
|
|
return NULL;
|
|
return NULL;
|