me_daq: don't access *data when insn->n == 0
authorIan Abbott <abbotti@mev.co.uk>
Thu, 15 Dec 2011 21:10:21 +0000 (21:10 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Thu, 15 Dec 2011 21:10:21 +0000 (21:10 +0000)
commit37f9ebfcc63ad83a610fdcbb9140dbff3b84a4d3
tree6c6ea043f5b8be28416ea6c0f9f23c23601b6a06
parent33a1e5b61156388aaa07bf75217b266c0111f0c2
me_daq: don't access *data when insn->n == 0

Due to recent change to do_insnlist_ioctl() and do_insn_ioctl(), the
'data' pointer will be NULL when insn->n == 0.  Do not access *data
in this case.

Also for INSN_WRITE on the AO subdevice, write the nth data value in the
loop instead of the 0th data value.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
comedi/drivers/me_daq.c