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: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Sebastian Andrzej Siewior 2013-10-07 13:42:00 +01:00 коммит произвёл Jonathan Cameron
Родитель 84088ebd14
Коммит 11cb454f09
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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)
{
int ret;
int ret = 0;
FILE *sysfsfp;
int test;
char *temp = malloc(strlen(basedir) + strlen(filename) + 2);