diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/eeh.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 780fb27a0099..32eaddfa5470 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) | |||
957 | pci_addr_cache_remove_device(dev); | 957 | pci_addr_cache_remove_device(dev); |
958 | 958 | ||
959 | dn = pci_device_to_OF_node(dev); | 959 | dn = pci_device_to_OF_node(dev); |
960 | PCI_DN(dn)->pcidev = NULL; | 960 | if (PCI_DN(dn)->pcidev) { |
961 | pci_dev_put (dev); | 961 | PCI_DN(dn)->pcidev = NULL; |
962 | pci_dev_put (dev); | ||
963 | } | ||
962 | } | 964 | } |
963 | 965 | ||
964 | void eeh_remove_bus_device(struct pci_dev *dev) | 966 | void eeh_remove_bus_device(struct pci_dev *dev) |