Staging: comedi: apci3200: fix test of ui_DelayTime range in i_APCI3200_CommandTestAn...
authorRoel Kluin <roel.kluin@gmail.com>
Tue, 25 Aug 2009 13:19:27 +0000 (15:19 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:02:29 +0000 (12:02 -0700)
For ui_DelayTime to be less than 1 and greater than 1023 is logically
impossible.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c

index 9b53255bd45be0d3eef2c4afad73152e78e6ba19..010697fa293690ed5857fc0f599f21a675274a54 100644 (file)
@@ -2669,7 +2669,7 @@ int i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_s
                        err++;
                        printk("\nThe Delay time base selection is in error\n");
                }
-               if (ui_DelayTime < 1 && ui_DelayTime > 1023) {
+               if (ui_DelayTime < 1 || ui_DelayTime > 1023) {
                        err++;
                        printk("\nThe Delay time value is in error\n");
                }