diff options
Diffstat (limited to 'cpukit/dev/i2c')
-rw-r--r-- | cpukit/dev/i2c/i2c-dev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cpukit/dev/i2c/i2c-dev.c b/cpukit/dev/i2c/i2c-dev.c index b03effd1df..cf1cf41ba8 100644 --- a/cpukit/dev/i2c/i2c-dev.c +++ b/cpukit/dev/i2c/i2c-dev.c @@ -224,14 +224,13 @@ static int i2c_dev_do_init( fd = open(bus_path, O_RDWR); if (fd < 0) { (*destroy)(dev); - return -1; } rv = ioctl(fd, I2C_BUS_GET_CONTROL, &dev->bus); if (rv != 0) { + (void) close(fd); (*destroy)(dev); - return -1; } |