diff options
author | Hartmut Knaack <knaack.h@gmx.de> | 2015-05-31 15:40:17 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-06-01 10:33:47 +0300 |
commit | 0e799878175aa7d08f5882b6a391de4724c52e9e (patch) | |
tree | 385a2ad8310cab0879a12a2e111a2c5e576e1231 /tools/iio/iio_event_monitor.c | |
parent | 5dc65d791ddafc9f6d944391e379708b6056fc48 (diff) | |
download | linux-0e799878175aa7d08f5882b6a391de4724c52e9e.tar.xz |
tools:iio: return values directly
Return directly, if no common cleanup is required.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/iio/iio_event_monitor.c')
-rw-r--r-- | tools/iio/iio_event_monitor.c | 5 |
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; } |