addi_common: don't access *data when insn->n == 0
authorIan Abbott <abbotti@mev.co.uk>
Thu, 15 Dec 2011 20:24:17 +0000 (20:24 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Thu, 15 Dec 2011 20:24:17 +0000 (20:24 +0000)
commit23813432ec7ec3681bf90f4ad2a08afd573ee9f3
treebcd6823b0d512a1744d9fd00d8bdce9b09dbcb5f
parentb5fe10aab510daa70dbee7e05710608b21faaeff
addi_common: don't access *data when insn->n == 0

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.

The INSN_READ handler for the EEPROM was ignoring insn->n.

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