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.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
{
pci20xxx_subdev_private *sdp = s->private;
+ if (insn->n == 0)
+ return 0;
+
data[0] = sdp->pci20006.last_data[CR_CHAN(insn->chanspec)];
return 1;
int hi, lo;
unsigned int boarddata;
+ if (insn->n == 0)
+ return 0;
+
sdp->pci20006.last_data[CR_CHAN(insn->chanspec)] = data[0];
boarddata = (((unsigned int)data[0] + 0x8000) & 0xffff); /* comedi-data -> board-data */
lo = (boarddata & 0xff);