ensure i2c_end is always called