1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/srf02: fixed missing i2c_release in init()

This commit is contained in:
Hauke Petersen 2016-03-21 15:38:49 +01:00
parent ff2ff5d008
commit c86a06d585

View File

@ -73,6 +73,7 @@ int srf02_init(srf02_t *dev, i2c_t i2c, uint8_t addr)
/* try to read the software revision (read the CMD reg) from the device */
i2c_read_reg(i2c, dev->addr, REG_CMD, &rev);
if (rev == 0 || rev == 255) {
i2c_release(dev->i2c);
DEBUG("[srf02] error reading the devices software revision\n");
return -1;
} else {