提交 11cb454f 编写于 作者: S Sebastian Andrzej Siewior 提交者: Jonathan Cameron

staging: iio: generic_buffer: initialize ret

The `ret´ variable is only initialized in the error case. For some reason
it was always != 0 while I played with generic_buffer so here is a patch.
Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 84088ebd
...@@ -502,7 +502,7 @@ inline int find_type_by_name(const char *name, const char *type) ...@@ -502,7 +502,7 @@ inline int find_type_by_name(const char *name, const char *type)
inline int _write_sysfs_int(char *filename, char *basedir, int val, int verify) inline int _write_sysfs_int(char *filename, char *basedir, int val, int verify)
{ {
int ret; int ret = 0;
FILE *sysfsfp; FILE *sysfsfp;
int test; int test;
char *temp = malloc(strlen(basedir) + strlen(filename) + 2); char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册