summaryrefslogtreecommitdiff
path: root/tools/iio/generic_buffer.c
diff options
context:
space:
mode:
authorHartmut Knaack <knaack.h@gmx.de>2015-05-31 14:40:17 +0200
committerJonathan Cameron <jic23@kernel.org>2015-06-01 08:33:47 +0100
commit0e799878175aa7d08f5882b6a391de4724c52e9e (patch)
tree385a2ad8310cab0879a12a2e111a2c5e576e1231 /tools/iio/generic_buffer.c
parent5dc65d791ddafc9f6d944391e379708b6056fc48 (diff)
downloadlwn-0e799878175aa7d08f5882b6a391de4724c52e9e.tar.gz
lwn-0e799878175aa7d08f5882b6a391de4724c52e9e.zip
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/generic_buffer.c')
-rw-r--r--tools/iio/generic_buffer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/iio/generic_buffer.c b/tools/iio/generic_buffer.c
index cf9a4120204f..62ec398922a0 100644
--- a/tools/iio/generic_buffer.c
+++ b/tools/iio/generic_buffer.c
@@ -238,8 +238,7 @@ int main(int argc, char **argv)
dev_num = find_type_by_name(device_name, "iio:device");
if (dev_num < 0) {
printf("Failed to find the %s\n", device_name);
- ret = dev_num;
- goto error_ret;
+ return dev_num;
}
printf("iio device number being used is %d\n", dev_num);
@@ -410,6 +409,6 @@ error_free_triggername:
free(trigger_name);
error_free_dev_dir_name:
free(dev_dir_name);
-error_ret:
+
return ret;
}