From: Sebastian Andrzej Siewior Date: Mon, 7 Oct 2013 12:42:00 +0000 (+0100) Subject: staging: iio: generic_buffer: initialize ret X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=11cb454f092397b8cb1ba478efaa5743bea604a2;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Jonathan Cameron --- diff --git a/drivers/staging/iio/Documentation/iio_utils.h b/drivers/staging/iio/Documentation/iio_utils.h index cf32ae099cd6..35154d60faf6 100644 --- a/drivers/staging/iio/Documentation/iio_utils.h +++ b/drivers/staging/iio/Documentation/iio_utils.h @@ -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);