diff --git a/drivers/mpu9150/mpu9150.c b/drivers/mpu9150/mpu9150.c index 7045051628..d5970267f0 100644 --- a/drivers/mpu9150/mpu9150.c +++ b/drivers/mpu9150/mpu9150.c @@ -90,6 +90,7 @@ int mpu9150_init(mpu9150_t *dev, i2c_t i2c, mpu9150_hw_addr_t hw_addr, /* Initialize magnetometer */ if (compass_init(dev)) { + i2c_release(dev->i2c_dev); return -2; } /* Release the bus, it is acquired again inside each function */