summaryrefslogtreecommitdiff
path: root/tools/iio/iio_event_monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/iio/iio_event_monitor.c')
-rw-r--r--tools/iio/iio_event_monitor.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
index 1316527f3c3c..7f56238b1d66 100644
--- a/tools/iio/iio_event_monitor.c
+++ b/tools/iio/iio_event_monitor.c
@@ -258,8 +258,7 @@ int main(int argc, char **argv)
device_name, dev_num);
ret = asprintf(&chrdev_name, "/dev/iio:device%d", dev_num);
if (ret < 0) {
- ret = -ENOMEM;
- goto error_ret;
+ return -ENOMEM;
}
} else {
/* If we can't find a IIO device by name assume device_name is a
@@ -312,6 +311,6 @@ int main(int argc, char **argv)
error_free_chrdev_name:
free(chrdev_name);
-error_ret:
+
return ret;
}