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>
short output;
unsigned long irq_flags;
short output;
unsigned long irq_flags;
+ if (insn->n == 0)
+ return 0;
+
// card expects two's complement data
output = data[0] - (1 << (thisboard->resolution - 1));
// if the write is to the 'update' channel, we need to remember its value
// card expects two's complement data
output = data[0] - (1 << (thisboard->resolution - 1));
// if the write is to the 'update' channel, we need to remember its value