summaryrefslogtreecommitdiff
path: root/drivers/staging/octeon/ethernet.c
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2018-10-30 17:23:54 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-07 13:05:39 +0100
commit4a4c1b1d5a1d1f083ea9a9fe8b179bfa9e62e12a (patch)
tree28c21bacabd9a07a2308b2f33c15565454201fd0 /drivers/staging/octeon/ethernet.c
parent43818b03c518b7aed6bbe95ce2bcd4c5aaed2473 (diff)
staging: comedi: ni_labpc_common: Use insn->n in AO insn_write handler
The `insn_write` handler for the AO subdevice (`labpc_ao_insn_write()`) currently ignores `insn->n` (the number of samples to write) and assumes a single sample is to be written. But `insn->n` could be 0, meaning no samples should be written, in which case `data[0]` is invalid. Follow the usual Comedi guidelines and change `labpc_ao_insn_write()` to write the specified number of samples. This fixes the assumption that `data[0]` is valid. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon/ethernet.c')
0 files changed, 0 insertions, 0 deletions