tools:iio:lsiio: add closedir before exit

In dump_channels() the DIR *dp was left open on exit. Close it and check
for errors.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
diff --git a/tools/iio/lsiio.c b/tools/iio/lsiio.c
index c585440..65a2385 100644
--- a/tools/iio/lsiio.c
+++ b/tools/iio/lsiio.c
@@ -56,7 +56,7 @@
 			printf("   %-10s\n", ent->d_name);
 		}
 
-	return 0;
+	return (closedir(dp) == -1) ? -errno : 0;
 }
 
 static int dump_one_device(const char *dev_dir_name)