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>
WORD w_Address;
w_Address = CR_CHAN(insn->chanspec); // address to be read as 0,1,2,3...255
+ if (insn->n == 0)
+ return 0;
+
w_Data = w_EepromReadWord(devpriv->i_IobaseAmcc,
this_board->pc_EepromChip, 0x100 + (2 * w_Address));
data[0] = w_Data;