aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/pci/pci_bus.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/pci/pci_bus.h')
-rw-r--r--arch/s390/pci/pci_bus.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/pci/pci_bus.h b/arch/s390/pci/pci_bus.h
index 55c9488e504c..8d2fcd091ca7 100644
--- a/arch/s390/pci/pci_bus.h
+++ b/arch/s390/pci/pci_bus.h
@@ -13,7 +13,8 @@ void zpci_bus_device_unregister(struct zpci_dev *zdev);
void zpci_release_device(struct kref *kref);
static inline void zpci_zdev_put(struct zpci_dev *zdev)
{
- kref_put(&zdev->kref, zpci_release_device);
+ if (zdev)
+ kref_put(&zdev->kref, zpci_release_device);
}
static inline void zpci_zdev_get(struct zpci_dev *zdev)