aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/events.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen/events.c')
-rw-r--r--drivers/xen/events.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 721b393fd8aa..77ede77a9ee9 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -691,7 +691,7 @@ error_irq:
691 691
692int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type) 692int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type)
693{ 693{
694 int irq = -1; 694 int ret, irq = -1;
695 struct physdev_map_pirq map_irq; 695 struct physdev_map_pirq map_irq;
696 int rc; 696 int rc;
697 int pos; 697 int pos;
@@ -736,9 +736,17 @@ int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type)
736 handle_level_irq, 736 handle_level_irq,
737 (type == PCI_CAP_ID_MSIX) ? "msi-x":"msi"); 737 (type == PCI_CAP_ID_MSIX) ? "msi-x":"msi");
738 738
739 ret = set_irq_msi(irq, msidesc);
740 if (ret)
741 goto out_irq;
742
739out: 743out:
740 spin_unlock(&irq_mapping_update_lock); 744 spin_unlock(&irq_mapping_update_lock);
741 return irq; 745 return irq;
746out_irq:
747 spin_unlock(&irq_mapping_update_lock);
748 xen_free_irq(irq);
749 return -1;
742} 750}
743#endif 751#endif
744 752