Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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,