mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 22:13:52 +01:00
Merge pull request #2456 from fnack/mpu_bugfix
drivers/mpu9150: Add missing I2C release for error case
This commit is contained in:
commit
ebe0cb4516
@ -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 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user