Commit 8f87b832 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

Staging: comedi: adv_pci1710: Remove unneeded chanlist_len check

For AI command testing, the driver does not need to range-check
the length of the channel list as the comedi core has already
checked it.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 61283d22
...@@ -1035,14 +1035,6 @@ static int pci171x_ai_cmdtest(struct comedi_device *dev, ...@@ -1035,14 +1035,6 @@ static int pci171x_ai_cmdtest(struct comedi_device *dev,
} }
} }
if (!cmd->chanlist_len) {
cmd->chanlist_len = 1;
err++;
}
if (cmd->chanlist_len > this_board->n_aichan) {
cmd->chanlist_len = this_board->n_aichan;
err++;
}
if (cmd->scan_end_arg != cmd->chanlist_len) { if (cmd->scan_end_arg != cmd->chanlist_len) {
cmd->scan_end_arg = cmd->chanlist_len; cmd->scan_end_arg = cmd->chanlist_len;
err++; err++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment