summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorVasiliy Kulikov2010-09-12 20:56:35 +0200
committerGreg Kroah-Hartman2010-09-16 21:37:34 +0200
commit2503a26554c7e73c544fc97f47c1d41faa88bd07 (patch)
tree5859b8aed34415341f9b8e64ceb854bc78f8b447 /drivers/staging
parentstaging: crystalhd: fix signed bug (diff)
downloadkernel-qcow2-linux-2503a26554c7e73c544fc97f47c1d41faa88bd07.tar.gz
kernel-qcow2-linux-2503a26554c7e73c544fc97f47c1d41faa88bd07.tar.xz
kernel-qcow2-linux-2503a26554c7e73c544fc97f47c1d41faa88bd07.zip
staging: comedi: fix signess bug
ai_count and ao_counter are unsigned, check for < 0 doesn't make sense. Cast them to int. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/comedi/drivers/cb_pcidas64.c2
-rw-r--r--drivers/staging/comedi/drivers/usbdux.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c
index 9b1dd3cc2120..2583e16cd02a 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas64.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas64.c
@@ -3078,7 +3078,7 @@ static void handle_ai_interrupt(struct comedi_device *dev,
spin_unlock_irqrestore(&dev->spinlock, flags);
}
/* if we are have all the data, then quit */
- if ((cmd->stop_src == TRIG_COUNT && priv(dev)->ai_count <= 0) ||
+ if ((cmd->stop_src == TRIG_COUNT && (int)priv(dev)->ai_count <= 0) ||
(cmd->stop_src == TRIG_EXT && (status & ADC_STOP_BIT))) {
async->events |= COMEDI_CB_EOA;
}
diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c
index 4b320b1ff823..6131e2dd0591 100644
--- a/drivers/staging/comedi/drivers/usbdux.c
+++ b/drivers/staging/comedi/drivers/usbdux.c
@@ -649,7 +649,7 @@ static void usbduxsub_ao_IsocIrq(struct urb *urb)
/* normal operation: executing a command in this subdevice */
this_usbduxsub->ao_counter--;
- if (this_usbduxsub->ao_counter <= 0) {
+ if ((int)this_usbduxsub->ao_counter <= 0) {
/* timer zero */
this_usbduxsub->ao_counter = this_usbduxsub->ao_timer;