Skip to contentSkip to conversation

From: Gavin Shan <[email protected]>]

PATCH New Benjamin Herrenschmidt 1 participant 1 message Nov 23, 2012 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 From: Gavin Shan <[email protected]>]

pseries msi: fixed crash on PCI devices without EEH capability

---
 arch/powerpc/platforms/pseries/msi.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/platforms/pseries/msi.c +2 -1
index d19f497..e5b0847 100644
@@ -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 */
 	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);
 	if (!dn)
 		return NULL;
Signature · 1 line
1.7.10.4