Skip to content

Commit

Permalink
Staging: comedi: apci3200: fix test of ui_DelayTime range in i_APCI32…
Browse files Browse the repository at this point in the history
…00_CommandTestAnalogInput()

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>
  • Loading branch information
Roel Kluin authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent 48c8276 commit 7ff177a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 7ff177a

Please sign in to comment.