Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions drivers/sensor/bosch/bmi160/emul_bmi160.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,15 @@ static int bmi160_emul_io_spi(const struct emul *target, const struct spi_config
LOG_DBG("Unknown tx_bufs->count %d", count);
return -EIO;
}
tx = tx_bufs->buffers;
txd = &tx_bufs->buffers[1];
tx = tx_bufs ? tx_bufs->buffers : NULL;
txd = tx_bufs ? &tx_bufs->buffers[1] : NULL;
rxd = rx_bufs ? &rx_bufs->buffers[1] : NULL;

if (tx == NULL) {
LOG_DBG("tx cannot be NULL");
return -EIO;
}

if (tx->len != 1) {
LOG_DBG("Unknown tx->len %d", tx->len);
return -EIO;
Expand Down
Loading