Skip to content
Commit 13015199 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman
Browse files

staging: comedi: cb_pcidas64: Use insn->n in AO insn_write handler



The `insn_write` handler for the AO subdevice (`ao_winsn()` 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 `ao_winsn()` to write the
specified number of samples.  This fixes the assumption that `data[0]`
is valid.

Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fafb85b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment