This BUG_ON can never happen. The 'chan' value comes from the comedi
core in the insn->chanspec and will always be in range for the subdevice
number of channels (s->n_chan = NUM_PFI_CHANNELS).
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>
if (source == pfi_output_select_do)
return -EINVAL;
}
- BUG_ON(chan >= NUM_PFI_CHANNELS);
devpriv->pfi_output_selects[chan] = source;
if (devpriv->pfi_direction_bits & (((uint64_t) 1) << chan))
{
struct ni_660x_private *devpriv = dev->private;
- BUG_ON(chan >= NUM_PFI_CHANNELS);
return devpriv->pfi_output_selects[chan];
}