rk_i2c_transfer: fix off-by-one in check for last message
This also fixes an access beyond msgs array.
MFC after: 1 week