From: Michael Ellerman Date: Tue, 14 Apr 2015 06:49:05 +0000 (+1000) Subject: powerpc/eeh: Fix crash in eeh_add_device_early() on Cell X-Git-Tag: v4.1-rc1~113^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=89a51df5ab1d;p=karo-tx-linux.git 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: ff57b454ddb9 ("powerpc/eeh: Do probe on pci_dn") Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index 76253eb146be..a4c62eb0ee48 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c @@ -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 */