Message ID | ac8f92701003122300y822e2abx1feb0924994fb629@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
--- a/virt/kvm/assigned-dev.c 2010-03-02 20:10:18.000000000 +0800 +++ b/virt/kvm/assigned-dev.c 2010-03-02 20:26:18.000000000 +0800 @@ -315,12 +315,16 @@ static int assigned_device_enable_host_m kvm_assigned_dev_intr, 0, "kvm_assigned_msix_device", (void *)dev); - /* FIXME: free requested_irq's on failure */ if (r) - return r; + goto err; } return 0; +err: + for (i -= 1; i >= 0; i--) + free_irq(dev->host_msix_entries[i].vector, (void *)dev); + pci_disable_msix(dev->dev); + return r; } #endif