summaryrefslogtreecommitdiffstats
path: root/tools/iio
diff options
context:
space:
mode:
authorHartmut Knaack <knaack.h@gmx.de>2015-05-31 14:40:20 +0200
committerJonathan Cameron <jic23@kernel.org>2015-06-01 08:37:09 +0100
commitace76e42bcd5d67e5be303997a4dc325d44366ce (patch)
tree8f293c39f9dc22632534574b7d067b9b584e90e4 /tools/iio
parent33ebcb21a67f257faf1128f08a6d7c0299cb0da2 (diff)
downloadop-kernel-dev-ace76e42bcd5d67e5be303997a4dc325d44366ce.zip
op-kernel-dev-ace76e42bcd5d67e5be303997a4dc325d44366ce.tar.gz
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 <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/iio')
-rw-r--r--tools/iio/iio_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/iio/iio_utils.c b/tools/iio/iio_utils.c
index c83f4df..7c0abb3 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)
OpenPOWER on IntegriCloud