summaryrefslogtreecommitdiffstats
path: root/tools/iio
diff options
context:
space:
mode:
Diffstat (limited to 'tools/iio')
-rw-r--r--tools/iio/iio_utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/iio/iio_utils.c b/tools/iio/iio_utils.c
index f12bc2e81c80..c5b4136e648a 100644
--- a/tools/iio/iio_utils.c
+++ b/tools/iio/iio_utils.c
@@ -144,6 +144,10 @@ int iioutils_get_type(unsigned *is_signed,
ret = -errno;
printf("failed to pass scan type description\n");
goto error_close_sysfsfp;
+ } else if (ret != 5) {
+ ret = -EIO;
+ printf("scan type description didn't match\n");
+ goto error_close_sysfsfp;
}
*be = (endianchar == 'b');
*bytes = padint / 8;