diff options
author | Wei Liu <wei.liu2@citrix.com> | 2013-01-31 15:46:56 +0100 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-02-06 16:32:45 +0100 |
commit | 68ba45ff389295ddccbb976b8881de7c46140e00 (patch) | |
tree | 9abf172e611c5e1729f273bcb3ae6e4ec2cb484a /drivers/xen/events.c | |
parent | xen-pciback: rate limit error messages from xen_pcibk_enable_msi{,x}() (diff) | |
download | linux-68ba45ff389295ddccbb976b8881de7c46140e00.tar.xz linux-68ba45ff389295ddccbb976b8881de7c46140e00.zip |
xen: fix error handling path if xen_allocate_irq_dynamic fails
It is possible that the call to xen_allocate_irq_dynamic() returns negative
number other than -1.
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/xen/events.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 0be4df39e953..74d77dfa5f63 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -840,7 +840,7 @@ int bind_evtchn_to_irq(unsigned int evtchn) if (irq == -1) { irq = xen_allocate_irq_dynamic(); - if (irq == -1) + if (irq < 0) goto out; irq_set_chip_and_handler_name(irq, &xen_dynamic_chip, @@ -944,7 +944,7 @@ int bind_virq_to_irq(unsigned int virq, unsigned int cpu) if (irq == -1) { irq = xen_allocate_irq_dynamic(); - if (irq == -1) + if (irq < 0) goto out; irq_set_chip_and_handler_name(irq, &xen_percpu_chip, |