projects
/
contrib
/
mraa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25bd897
)
i2c.c: Fix resource leak when I2C_FUNCS ioctl fails
author
Brendan Le Foll
<brendan.le.foll@intel.com>
Tue, 20 Jan 2015 17:12:57 +0000
(17:12 +0000)
committer
Brendan Le Foll
<brendan.le.foll@intel.com>
Tue, 20 Jan 2015 17:15:13 +0000
(17:15 +0000)
This isn't a true failure condition just assume we have no features and carry
on
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
src/i2c/i2c.c
patch
|
blob
|
history
diff --git
a/src/i2c/i2c.c
b/src/i2c/i2c.c
index
ba7d051
..
5d87eac
100644
(file)
--- a/
src/i2c/i2c.c
+++ b/
src/i2c/i2c.c
@@
-129,7
+129,7
@@
mraa_i2c_init_raw(unsigned int bus)
if (ioctl(dev->fh, I2C_FUNCS, &dev->funcs) < 0) {
syslog(LOG_CRIT, "i2c: Failed to get I2C_FUNC map from device");
-
return NULL
;
+
dev->funcs = 0
;
}
if (advance_func->i2c_init_post != NULL) {