comedi/drivers.c: handle insn->n == 0 in insn_rw_emulate_bits
authorIan Abbott <abbotti@mev.co.uk>
Thu, 15 Dec 2011 18:01:39 +0000 (18:01 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Thu, 15 Dec 2011 18:01:39 +0000 (18:01 +0000)
commitcb4dd573e72bb5307877ae940a5747f0f16ef4d9
tree6e2e3c6117366b3ea1a1acf257051c99a90c8de9
parente98a40ed472e4476ab10053db59c54aedb5951f2
comedi/drivers.c: handle insn->n == 0 in insn_rw_emulate_bits

A recent change to do_insnlist_ioctl() and do_insn_ioctl() to handle
arbitrary limits on means that the 'data' pointer will now be NULL when
insn->n == 0.  Need to check insn->n is non-zero before accessing *data.

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