Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57ac827c authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman
Browse files

Staging: comedi: pcl818: 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 64a1f7bd
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1392,14 +1392,6 @@ static int ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
		}
	}

	if (!cmd->chanlist_len) {
		cmd->chanlist_len = 1;
		err++;
	}
	if (cmd->chanlist_len > s->n_chan) {
		cmd->chanlist_len = s->n_chan;
		err++;
	}
	if (cmd->scan_end_arg != cmd->chanlist_len) {
		cmd->scan_end_arg = cmd->chanlist_len;
		err++;