diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 780fb27a0099e24ca66b3fee2fbb9a5f7a258f1b..32eaddfa5470a635741228ada3365e4b9f20b5de 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -957,8 +957,10 @@ static void eeh_remove_device(struct pci_dev *dev) pci_addr_cache_remove_device(dev); dn = pci_device_to_OF_node(dev); - PCI_DN(dn)->pcidev = NULL; - pci_dev_put (dev); + if (PCI_DN(dn)->pcidev) { + PCI_DN(dn)->pcidev = NULL; + pci_dev_put (dev); + } } void eeh_remove_bus_device(struct pci_dev *dev)