From ace76e42bcd5d67e5be303997a4dc325d44366ce Mon Sep 17 00:00:00 2001 From: Hartmut Knaack Date: Sun, 31 May 2015 14:40:20 +0200 Subject: tools:iio:iio_utils: move up reset of sysfsfp In iioutils_get_type() it is logically better fitting to have sysfsfp assigned zero right after closing it. Signed-off-by: Hartmut Knaack Signed-off-by: Jonathan Cameron --- tools/iio/iio_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/iio') diff --git a/tools/iio/iio_utils.c b/tools/iio/iio_utils.c index c83f4dfe71d6..7c0abb306f5a 100644 --- a/tools/iio/iio_utils.c +++ b/tools/iio/iio_utils.c @@ -175,10 +175,10 @@ int iioutils_get_type(unsigned *is_signed, goto error_free_filename; } + sysfsfp = 0; free(filename); filename = 0; - sysfsfp = 0; } error_close_sysfsfp: if (sysfsfp) -- cgit v1.2.3