diff options
Diffstat (limited to 'driver/accelgyro_bmi160.c')
-rw-r--r-- | driver/accelgyro_bmi160.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/driver/accelgyro_bmi160.c b/driver/accelgyro_bmi160.c index 4468e6f6b4..b1652e4b05 100644 --- a/driver/accelgyro_bmi160.c +++ b/driver/accelgyro_bmi160.c @@ -1116,8 +1116,10 @@ static int irq_handler(struct motion_sensor_t *s, uint32_t *event) do { rv = raw_read32(s->port, s->addr, BMI160_INT_STATUS_0, &interrupt); - /* Bail out of this loop if the sensor isn't powered. */ - if (rv == EC_ERROR_NOT_POWERED) + /* + * Bail out of this loop there was an error reading the register + */ + if (rv) return rv; #ifdef CONFIG_GESTURE_SENSOR_BATTERY_TAP |