Merge branch 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
[pandora-kernel.git] / virt / kvm / assigned-dev.c
index 7debe8c..3ad0925 100644 (file)
@@ -208,6 +208,8 @@ static void kvm_free_assigned_device(struct kvm *kvm,
        else
                pci_restore_state(assigned_dev->dev);
 
        else
                pci_restore_state(assigned_dev->dev);
 
+       assigned_dev->dev->dev_flags &= ~PCI_DEV_FLAGS_ASSIGNED;
+
        pci_release_regions(assigned_dev->dev);
        pci_disable_device(assigned_dev->dev);
        pci_dev_put(assigned_dev->dev);
        pci_release_regions(assigned_dev->dev);
        pci_disable_device(assigned_dev->dev);
        pci_dev_put(assigned_dev->dev);