浏览代码

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>
Michael Ellerman 10 年之前
父节点
当前提交
89a51df5ab
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/powerpc/kernel/eeh.c

+ 1 - 1
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 */