From: Nicolas Kaiser Date: Wed, 30 Mar 2011 19:14:26 +0000 (+0200) Subject: xen: events: fix error checks in bind_*_to_irqhandler() X-Git-Tag: v2.6.39-rc4~69^2~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=361ae8cb57ec35ace2fa5f9695dba14eca9893e0;p=karo-tx-linux.git xen: events: fix error checks in bind_*_to_irqhandler() Checking 'irq < 0' doesn't work when 'irq' is unsigned. The assigned bind_evtchn_to_irq() and bind_virq_to_irq() return int, so using int appears appropriate. Signed-off-by: Nicolas Kaiser Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 036343ba204e..589f0a53a604 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -912,8 +912,7 @@ int bind_evtchn_to_irqhandler(unsigned int evtchn, unsigned long irqflags, const char *devname, void *dev_id) { - unsigned int irq; - int retval; + int irq, retval; irq = bind_evtchn_to_irq(evtchn); if (irq < 0) @@ -955,8 +954,7 @@ int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, irq_handler_t handler, unsigned long irqflags, const char *devname, void *dev_id) { - unsigned int irq; - int retval; + int irq, retval; irq = bind_virq_to_irq(virq, cpu); if (irq < 0)