aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-02-18 16:43:35 +0000
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-03-10 14:44:43 -0500
commitf420e010edd84eb2c237fc87b7451e69740fed46 (patch)
tree904e9feb634f4cd4e4dbdc7de9b0fd009a86cd28 /drivers
parent2e55288f63343f0810f4f0a3004f78037cfb93d3 (diff)
downloadkernel_samsung_tuna-f420e010edd84eb2c237fc87b7451e69740fed46.zip
kernel_samsung_tuna-f420e010edd84eb2c237fc87b7451e69740fed46.tar.gz
kernel_samsung_tuna-f420e010edd84eb2c237fc87b7451e69740fed46.tar.bz2
xen: events: push set_irq_msi down into xen_create_msi_irq
Makes the tail end of this function look even more like xen_bind_pirq_msi_to_irq. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers')
-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 721b393..77ede77 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -691,7 +691,7 @@ error_irq:
int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type)
{
- int irq = -1;
+ int ret, irq = -1;
struct physdev_map_pirq map_irq;
int rc;
int pos;
@@ -736,9 +736,17 @@ int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type)
handle_level_irq,
(type == PCI_CAP_ID_MSIX) ? "msi-x":"msi");
+ ret = set_irq_msi(irq, msidesc);
+ if (ret)
+ goto out_irq;
+
out:
spin_unlock(&irq_mapping_update_lock);
return irq;
+out_irq:
+ spin_unlock(&irq_mapping_update_lock);
+ xen_free_irq(irq);
+ return -1;
}
#endif