diff options
author | Nicolas Kaiser <nikai@nikai.net> | 2011-03-30 15:14:26 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-03-30 15:37:04 -0400 |
commit | 361ae8cb57ec35ace2fa5f9695dba14eca9893e0 (patch) | |
tree | 2a2a2dac4ad8abbe701e4c475bd6e6470ea243bd /drivers/xen | |
parent | 0ce790e7d736cedc563e1fb4e998babf5a4dbc3d (diff) |
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@nikai.net>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | 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 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, | |||
912 | unsigned long irqflags, | 912 | unsigned long irqflags, |
913 | const char *devname, void *dev_id) | 913 | const char *devname, void *dev_id) |
914 | { | 914 | { |
915 | unsigned int irq; | 915 | int irq, retval; |
916 | int retval; | ||
917 | 916 | ||
918 | irq = bind_evtchn_to_irq(evtchn); | 917 | irq = bind_evtchn_to_irq(evtchn); |
919 | if (irq < 0) | 918 | if (irq < 0) |
@@ -955,8 +954,7 @@ int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, | |||
955 | irq_handler_t handler, | 954 | irq_handler_t handler, |
956 | unsigned long irqflags, const char *devname, void *dev_id) | 955 | unsigned long irqflags, const char *devname, void *dev_id) |
957 | { | 956 | { |
958 | unsigned int irq; | 957 | int irq, retval; |
959 | int retval; | ||
960 | 958 | ||
961 | irq = bind_virq_to_irq(virq, cpu); | 959 | irq = bind_virq_to_irq(virq, cpu); |
962 | if (irq < 0) | 960 | if (irq < 0) |