mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
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>
This commit is contained in:
parent
51ac8893a7
commit
68ba45ff38
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue