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);
unsigned long flags;
+ if (insn->n == 0)
+ return 0;
+
comedi_spin_lock_irqsave(&subpriv->spinlock, flags);
data[0] = i8254_read(subpriv->iobase, 0, chan);
comedi_spin_unlock_irqrestore(&subpriv->spinlock, flags);
int chan = CR_CHAN(insn->chanspec);
unsigned long flags;
+ if (insn->n == 0)
+ return 0;
+
comedi_spin_lock_irqsave(&subpriv->spinlock, flags);
i8254_write(subpriv->iobase, 0, chan, data[0]);
comedi_spin_unlock_irqrestore(&subpriv->spinlock, flags);