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>
{
int chan = CR_CHAN(insn->chanspec);
+ if (insn->n == 0)
+ return 0;
+
outb((unsigned char)((data[0] >> 24) & 0xff),
dev->iobase + chan * 0x20 + 0x10);
outb((unsigned char)((data[0] >> 16) & 0xff),
int chan = CR_CHAN(insn->chanspec);
int result;
+ if (insn->n == 0)
+ return 0;
+
a0 = inb(dev->iobase + chan * 0x20);
a1 = inb(dev->iobase + chan * 0x20 + 0x04);
a2 = inb(dev->iobase + chan * 0x20 + 0x08);