提交 e0f6959f 编写于 作者: H H Hartley Sweeten 提交者: Greg Kroah-Hartman

staging: comedi: ni_660x: remove BUG_ON(chan >= NUM_PFI_CHANNELS)

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: NH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 9186ccde
......@@ -1106,7 +1106,6 @@ static int ni_660x_set_pfi_routing(struct comedi_device *dev, unsigned chan,
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))
......@@ -1120,7 +1119,6 @@ static unsigned ni_660x_get_pfi_routing(struct comedi_device *dev,
{
struct ni_660x_private *devpriv = dev->private;
BUG_ON(chan >= NUM_PFI_CHANNELS);
return devpriv->pfi_output_selects[chan];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册