[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110330211426.13f182d6@absol.kitzblitz>
Date: Wed, 30 Mar 2011 21:14:26 +0200
From: Nicolas Kaiser <nikai@...ai.net>
To: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
xen-devel@...ts.xensource.com,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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 <nikai@...ai.net>
---
drivers/xen/events.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 036343b..589f0a5 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)
--
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists