提交 7ff177a8 编写于 作者: R Roel Kluin 提交者: Greg Kroah-Hartman

Staging: comedi: apci3200: fix test of ui_DelayTime range in i_APCI3200_CommandTestAnalogInput()

For ui_DelayTime to be less than 1 and greater than 1023 is logically
impossible.
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 48c8276d
......@@ -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");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册