das08: don't access *data when insn->n == 0
authorIan Abbott <abbotti@mev.co.uk>
Thu, 15 Dec 2011 19:38:52 +0000 (19:38 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Thu, 15 Dec 2011 19:38:52 +0000 (19:38 +0000)
commit028143ffc7da8a4326d6e1834be3fbcf9c8897dc
tree4766ff152057f883e8061e8764fb36a44739f7dd
parentda0d83332f9719c61b16b70ecbf76253a459d280
das08: 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 handle INSN_WRITE properly for AO subdevices.  Should use the nth
data value in the loop, not the 0th.

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