From c86a06d585bb9243da03f387e4cb0ffe9b1ab844 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Mon, 21 Mar 2016 15:38:49 +0100 Subject: [PATCH] drivers/srf02: fixed missing i2c_release in init() --- drivers/srf02/srf02.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/srf02/srf02.c b/drivers/srf02/srf02.c index 66e1f1a950..dc7265ff79 100644 --- a/drivers/srf02/srf02.c +++ b/drivers/srf02/srf02.c @@ -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 {