Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <mpe@ellerman.id.au>

+1 -1
+1 -1
arch/powerpc/kernel/eeh.c
··· 1053 1053 struct pci_controller *phb; 1054 1054 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); 1055 1055 1056 - if (!edev) 1056 + if (!edev || !eeh_enabled()) 1057 1057 return; 1058 1058 1059 1059 /* USB Bus children of PCI devices will not have BUID's */