From: Heena Sirwani Date: Mon, 6 Oct 2014 11:34:10 +0000 (+0530) Subject: Staging: iio: Documentation: Simplify error handling. X-Git-Tag: firefly_0821_release~176^2~2665^2~1294 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=edead9b1f9fa1e28e493ccaa831d0ac7aa0de74b;p=firefly-linux-kernel-4.4.55.git Staging: iio: Documentation: Simplify error handling. This also has the nice effect of removing of a temporary variable from stack and fixes the following checkpatch.pl warning: WARNING: Missing blank line after declarations. Signed-off-by: Heena Sirwani Acked-by: Daniel Baluta Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/Documentation/lsiio.c b/drivers/staging/iio/Documentation/lsiio.c index a82c93da10bd..3b436f13b872 100644 --- a/drivers/staging/iio/Documentation/lsiio.c +++ b/drivers/staging/iio/Documentation/lsiio.c @@ -69,11 +69,8 @@ static int dump_one_device(const char *dev_dir_name) read_sysfs_string("name", dev_dir_name, name); printf("Device %03d: %s\n", dev_idx, name); - if (verblevel >= VERBLEVEL_SENSORS) { - int ret = dump_channels(dev_dir_name); - if (ret) - return ret; - } + if (verblevel >= VERBLEVEL_SENSORS) + return dump_channels(dev_dir_name); return 0; }