2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-20 11:13:58 +08:00

powerpc/eeh: Fix crash in eeh_add_device_early() on Cell

The recent change to the EEH probing causes a crash on Cell because
eeh_ops is NULL.

Check if EEH is enabled and if not bail out.

Fixes: ff57b454dd ("powerpc/eeh: Do probe on pci_dn")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Michael Ellerman 2015-04-14 16:49:05 +10:00
parent 9a5cbce421
commit 89a51df5ab

View File

@ -1053,7 +1053,7 @@ void eeh_add_device_early(struct pci_dn *pdn)
struct pci_controller *phb;
struct eeh_dev *edev = pdn_to_eeh_dev(pdn);
if (!edev)
if (!edev || !eeh_enabled())
return;
/* USB Bus children of PCI devices will not have BUID's */