summaryrefslogtreecommitdiff
path: root/tools/iio/lsiio.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/iio/lsiio.c')
-rw-r--r--tools/iio/lsiio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/iio/lsiio.c b/tools/iio/lsiio.c
index c585440f864e..65a2385e2a78 100644
--- a/tools/iio/lsiio.c
+++ b/tools/iio/lsiio.c
@@ -56,7 +56,7 @@ static int dump_channels(const char *dev_dir_name)
printf(" %-10s\n", ent->d_name);
}
- return 0;
+ return (closedir(dp) == -1) ? -errno : 0;
}
static int dump_one_device(const char *dev_dir_name)