From: Wei Liu Date: Thu, 31 Jan 2013 14:46:56 +0000 (+0000) Subject: xen: fix error handling path if xen_allocate_irq_dynamic fails X-Git-Tag: v3.8~3^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=68ba45ff389295ddccbb976b8881de7c46140e00;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 Signed-off-by: Wei Liu Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 0be4df3..74d77df 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,