Commit 68ba45ff authored by Wei Liu's avatar Wei Liu Committed by Konrad Rzeszutek Wilk

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: default avatarDavid Vrabel <david.vrabel@citrix.com>
Signed-off-by: default avatarWei Liu <wei.liu2@citrix.com>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
parent 51ac8893
...@@ -840,7 +840,7 @@ int bind_evtchn_to_irq(unsigned int evtchn) ...@@ -840,7 +840,7 @@ int bind_evtchn_to_irq(unsigned int evtchn)
if (irq == -1) { if (irq == -1) {
irq = xen_allocate_irq_dynamic(); irq = xen_allocate_irq_dynamic();
if (irq == -1) if (irq < 0)
goto out; goto out;
irq_set_chip_and_handler_name(irq, &xen_dynamic_chip, 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) ...@@ -944,7 +944,7 @@ int bind_virq_to_irq(unsigned int virq, unsigned int cpu)
if (irq == -1) { if (irq == -1) {
irq = xen_allocate_irq_dynamic(); irq = xen_allocate_irq_dynamic();
if (irq == -1) if (irq < 0)
goto out; goto out;
irq_set_chip_and_handler_name(irq, &xen_percpu_chip, irq_set_chip_and_handler_name(irq, &xen_percpu_chip,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment