From: H Hartley Sweeten Date: Thu, 25 Jul 2013 23:11:10 +0000 (-0700) Subject: staging: comedi: usbdux: remove unnecessary check in usbdux_ao_cmd() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=66ce147c7d40b77704b44b6b2071d91f7c510b33;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: comedi: usbdux: remove unnecessary check in usbdux_ao_cmd() 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index 3fc61d134acb..80cfa80ba650 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; }