diff options
| author | Michael Ellerman <mpe@ellerman.id.au> | 2015-04-14 02:49:05 -0400 |
|---|---|---|
| committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-04-14 03:13:31 -0400 |
| commit | 89a51df5ab1d38b257300b8ac940bbac3bb0eb9b (patch) | |
| tree | fd7a905d056cf98088657b2e365909d30b84b11a | |
| parent | 9a5cbce421a283e6aea3c4007f141735bf9da8c3 (diff) | |
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>
| -rw-r--r-- | arch/powerpc/kernel/eeh.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
| 1053 | struct pci_controller *phb; | 1053 | struct pci_controller *phb; |
| 1054 | struct eeh_dev *edev = pdn_to_eeh_dev(pdn); | 1054 | struct eeh_dev *edev = pdn_to_eeh_dev(pdn); |
| 1055 | 1055 | ||
| 1056 | if (!edev) | 1056 | if (!edev || !eeh_enabled()) |
| 1057 | return; | 1057 | return; |
| 1058 | 1058 | ||
| 1059 | /* USB Bus children of PCI devices will not have BUID's */ | 1059 | /* USB Bus children of PCI devices will not have BUID's */ |
