adl_pci8164: don't access *data when insn->n == 0
authorIan Abbott <abbotti@mev.co.uk>
Thu, 15 Dec 2011 20:42:01 +0000 (20:42 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Thu, 15 Dec 2011 20:42:01 +0000 (20:42 +0000)
commit34e6673a742d7ed10784ac115635b3a39a386f7d
tree0df9395317d96d11f02544ffa95150be9252f4f4
parent39d1bc22b367716b0a604de7b5e9c997855d153a
adl_pci8164: 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 fixed instructions that printed the value of data[1] and returned 2
even though they only used data[0].

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