[PATCH 5/8] KVM: PCIPT: change order of device release

Ben-Ami Yassour
2008-07-16T13:17:15Z

Signed-off-by: Ben-Ami Yassour <benami@il.ibm.com>
---
arch/x86/kvm/x86.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 8d25b4a..65b307d 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -343,9 +343,9 @@ static void kvm_free_pci_passthrough(struct kvm *kvm)
pci_pt_dev = list_entry(ptr, struct kvm_pci_pt_dev_list, list);

/* Search for this device got us a refcount */
- pci_dev_put(pci_pt_dev->pt_dev.dev);
pci_release_regions(pci_pt_dev->pt_dev.dev);
pci_disable_device(pci_pt_dev->pt_dev.dev);
+ pci_dev_put(pci_pt_dev->pt_dev.dev);

list_del(&pci_pt_dev->list);
kfree(pci_pt_dev);
--
1.5.6