Skip to content

Commit 6bfb344

Browse files
committed
cc3200/mods/pybi2c: Raise OSError if readfrom_mem fails to write addr.
1 parent 22e2f4a commit 6bfb344

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cc3200/mods/pybi2c.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ STATIC void pyb_i2c_readmem_into (mp_arg_val_t *args, vstr_t *vstr) {
278278
if (!pyb_i2c_read (i2c_addr, (byte *)vstr->buf, vstr->len)) {
279279
mp_raise_OSError(MP_EIO);
280280
}
281+
} else {
282+
mp_raise_OSError(MP_EIO);
281283
}
282284
}
283285

0 commit comments

Comments
 (0)