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>
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;
}
/* 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;