s526: don't access *data when insn->n == 0
authorIan Abbott <abbotti@mev.co.uk>
Thu, 15 Dec 2011 19:06:37 +0000 (19:06 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Thu, 15 Dec 2011 19:06:37 +0000 (19:06 +0000)
commitd0acfa404d8a10c55a1756adc8bdcf6b636c2980
tree6dba0a781c95f12ba1727c13eda45a05c37790f1
parent523e136fafe6e53ef2ff7b8ab6990e3a6dd07ebb
s526: 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 the INSN_WRITE code for pulse-train generation should only access
data[1] if insn->n >= 2.

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