aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/events.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-02-18 11:43:27 -0500
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-03-10 14:44:34 -0500
commitae1635b05fae30804061406010914d85d12431ac (patch)
treea662f1babafc3e2be0bff15e7732ebc1a8cf585f /drivers/xen/events.c
parent260a7d4cfd26d8bad8ac3a7fce11de47491d7e00 (diff)
xen: events: do not leak IRQ from xen_allocate_pirq_msi when no pirq available.
Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: xen-devel@lists.xensource.com Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/events.c')
-rw-r--r--drivers/xen/events.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 89987a7bf26f..bce303590075 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -676,8 +676,11 @@ void xen_allocate_pirq_msi(char *name, int *irq, int *pirq, int alloc)
676 676
677 if (alloc & XEN_ALLOC_PIRQ) { 677 if (alloc & XEN_ALLOC_PIRQ) {
678 *pirq = find_unbound_pirq(MAP_PIRQ_TYPE_MSI); 678 *pirq = find_unbound_pirq(MAP_PIRQ_TYPE_MSI);
679 if (*pirq == -1) 679 if (*pirq == -1) {
680 xen_free_irq(*irq);
681 *irq = -1;
680 goto out; 682 goto out;
683 }
681 } 684 }
682 685
683 set_irq_chip_and_handler_name(*irq, &xen_pirq_chip, 686 set_irq_chip_and_handler_name(*irq, &xen_pirq_chip,