Skip to content

Commit

Permalink
sensor: bme280: fixed SPI device init
Browse files Browse the repository at this point in the history
Change-Id: I92bc6cbe9cc9458e0aaedf42c3821bcea91e15be
Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif committed Mar 22, 2017
1 parent e4aa741 commit 4679a5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/sensor/bme280/bme280.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ int bme280_init(struct device *dev)

data->i2c_slave_addr = BME280_I2C_ADDR;
#elif defined CONFIG_BME280_DEV_TYPE_SPI
if (!bme280_spi_init(data)) {
if (bme280_spi_init(data) < 0) {
SYS_LOG_DBG("spi master not found: %s",
CONFIG_BME280_I2C_MASTER_DEV_NAME);
CONFIG_BME280_SPI_DEV_NAME);
return -EINVAL;
}

Expand Down

0 comments on commit 4679a5f

Please sign in to comment.