From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 02/13] xen: fix error handling path if xen_allocate_irq_dynamic fails Date: Wed, 6 Feb 2013 10:49:29 -0500 Message-ID: <20130206154929.GB31828@konrad-lan.dumpdata.com> References: <1359643627-29486-1-git-send-email-wei.liu2@citrix.com> <1359643627-29486-3-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1359643627-29486-3-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: david.vrabel@citrix.com, konrad.wilk@oracle.com, ian.campbell@citrix.com, jbeulich@suse.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, Jan 31, 2013 at 02:46:56PM +0000, Wei Liu wrote: > It is possible that the call to xen_allocate_irq_dynamic() returns negative > number other than -1. Applied. > > Signed-off-by: Wei Liu > --- > drivers/xen/events.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/xen/events.c b/drivers/xen/events.c > index 2c94aad..93a3648 100644 > --- a/drivers/xen/events.c > +++ b/drivers/xen/events.c > @@ -820,7 +820,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, > @@ -923,7 +923,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, > -- > 1.7.10.4 >