This check is not necessary. The cmd->chanlist_len will always be less than or equal to the subdevice len_chanlist that was setup during the attach of the device.
Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> --- drivers/staging/comedi/drivers/usbdux.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index 3fc61d1..80cfa80 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c @@ -1080,9 +1080,6 @@ static int usbdux_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s) for (i = 0; i < cmd->chanlist_len; ++i) { unsigned int chan = CR_CHAN(cmd->chanlist[i]); - if (i >= NUMOUTCHANNELS) - break; - devpriv->dac_commands[i] = chan << 6; } -- 1.8.3.2 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
