Signed-off-by: Ben-Ami Yassour <[EMAIL PROTECTED]>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to