提交 68ba45ff 编写于 作者: W Wei Liu 提交者: 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: NDavid Vrabel <david.vrabel@citrix.com>
Signed-off-by: NWei Liu <wei.liu2@citrix.com>
Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册