Skip to content

Commit

Permalink
staging: comedi: adl_pci9111: remove chanlist_len checks
Browse files Browse the repository at this point in the history
The chanlist_len is validated by the comedi core before calling
the do_cmdtest function. Remove these redundant checks.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 11, 2012
1 parent 3acf317 commit e6e69aa
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions drivers/staging/comedi/drivers/adl_pci9111.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,16 +514,6 @@ pci9111_ai_do_cmd_test(struct comedi_device *dev,

/* Step 3 : make sure arguments are trivialy compatible */

if (cmd->chanlist_len < 1) {
cmd->chanlist_len = 1;
error++;
}

if (cmd->chanlist_len > board->ai_channel_nbr) {
cmd->chanlist_len = board->ai_channel_nbr;
error++;
}

if ((cmd->start_src == TRIG_NOW) && (cmd->start_arg != 0)) {
cmd->start_arg = 0;
error++;
Expand Down

0 comments on commit e6e69aa

Please sign in to comment.