From: Jing Zhang <zj.ba...@gmail.com>

Date: Sat Mar 13 14:05:27     2010

Cc: Avi Kivity <a...@redhat.com>
Signed-off-by: Jing Zhang <zj.ba...@gmail.com>

---

--- 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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to