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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Wednesday, September 16, 2009 - 9:15 am

Gitweb:     http://git.kernel.org/linus/7ff177a88782461893316a512e75a3f169fbae8b
Commit:     7ff177a88782461893316a512e75a3f169fbae8b
Parent:     48c8276d7ac534d62c594c9a493130ff9137675d
Author:     Roel Kluin <roel.kluin@gmail.com>
AuthorDate: Tue Aug 25 15:19:27 2009 +0200
Committer:  Greg Kroah-Hartman <gregkh@suse.de>
CommitDate: Tue Sep 15 12:02:29 2009 -0700

    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: 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>
---
 .../comedi/drivers/addi-data/hwdrv_apci3200.c      |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
index 9b53255..010697f 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
@@ -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");
 		}
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Staging: comedi: apci3200: fix test of ui_DelayTime range ..., Linux Kernel Mailing ..., (Wed Sep 16, 9:15 am)