summaryrefslogtreecommitdiffstats
path: root/tools/iio/lsiio.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/iio/lsiio.c')
-rw-r--r--tools/iio/lsiio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/iio/lsiio.c b/tools/iio/lsiio.c
index b271a9a796d2..3d650e668252 100644
--- a/tools/iio/lsiio.c
+++ b/tools/iio/lsiio.c
@@ -69,7 +69,7 @@ static int dump_one_device(const char *dev_dir_name)
return -EINVAL;
ret = read_sysfs_string("name", dev_dir_name, name);
- if (ret)
+ if (ret < 0)
return ret;
printf("Device %03d: %s\n", dev_idx, name);
@@ -92,7 +92,7 @@ static int dump_one_trigger(const char *dev_dir_name)
return -EINVAL;
ret = read_sysfs_string("name", dev_dir_name, name);
- if (ret)
+ if (ret < 0)
return ret;
printf("Trigger %03d: %s\n", dev_idx, name);