[PATCH 7/9] staging: comedi: usbduxfast: remove (*do_cmd) MAX_SAMPLING_PERIOD check

H Hartley Sweeten hsweeten at visionengravers.com
Fri Aug 14 21:29:40 UTC 2015


The (*do_cmdtest) properly checks the MAX_SAMPLE_PERIOD. Remove the
redundant check in the (*do_cmd).

Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/comedi/drivers/usbduxfast.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c
index 407f091..649d56e 100644
--- a/drivers/staging/comedi/drivers/usbduxfast.c
+++ b/drivers/staging/comedi/drivers/usbduxfast.c
@@ -519,11 +519,6 @@ static int usbduxfast_ai_cmd(struct comedi_device *dev,
 		up(&devpriv->sem);
 		return -EINVAL;
 	}
-	if (steps > MAX_SAMPLING_PERIOD) {
-		dev_err(dev->class_dev, "sampling rate too low\n");
-		up(&devpriv->sem);
-		return -EINVAL;
-	}
 
 	switch (cmd->chanlist_len) {
 	case 1:
-- 
2.4.3



More information about the devel mailing list