summaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug/s390_pci_hpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/s390_pci_hpc.c')
-rw-r--r--drivers/pci/hotplug/s390_pci_hpc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/s390_pci_hpc.c b/drivers/pci/hotplug/s390_pci_hpc.c
index 1579ba895edf..b59f84918fe0 100644
--- a/drivers/pci/hotplug/s390_pci_hpc.c
+++ b/drivers/pci/hotplug/s390_pci_hpc.c
@@ -91,6 +91,9 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
pdev = pci_get_slot(zbus->bus, zdev->devfn);
if (pdev) {
+ if (pci_num_vf(pdev))
+ return -EBUSY;
+
pci_stop_and_remove_bus_device_locked(pdev);
pci_dev_put(pdev);
}