public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: clean up assigned_device_enable_host_msix
@ 2010-03-13  7:00 jing zhang
  2010-03-15 18:52 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: jing zhang @ 2010-03-13  7:00 UTC (permalink / raw)
  To: kvm-devel

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

Date: Sat Mar 13 14:05:27     2010

Cc: Avi Kivity <avi@redhat.com>
Signed-off-by: Jing Zhang <zj.barak@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-15 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-13  7:00 [PATCH] kvm: clean up assigned_device_enable_host_msix jing zhang
2010-03-15 18:52 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox