diff options
author | Tina Johnson <tinajohnson.1234@gmail.com> | 2015-03-09 16:11:18 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-09 13:39:10 +0100 |
commit | 9d9f5a2dac916013d9b0560e176a7619f7bf958d (patch) | |
tree | d95cc8c6e0b6d81e012a7a82a298ee184098a623 /drivers/staging/iio/meter/ade7758_ring.c | |
parent | 07f83131e5b5d309dc8dd41911b66d3ce4c99323 (diff) | |
download | linux-9d9f5a2dac916013d9b0560e176a7619f7bf958d.tar.bz2 |
drivers: staging: iio: meter: Removed unnecessary variable
Variable ret is used only to store the error code to be returned.
Hence use of ret is removed and the return statement modified.
Coccinelle was used to prepare the patch:
@rule1@
identifier ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/iio/meter/ade7758_ring.c')
-rw-r--r-- | drivers/staging/iio/meter/ade7758_ring.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/iio/meter/ade7758_ring.c b/drivers/staging/iio/meter/ade7758_ring.c index 3792b5761645..9725a04c0c92 100644 --- a/drivers/staging/iio/meter/ade7758_ring.c +++ b/drivers/staging/iio/meter/ade7758_ring.c @@ -120,8 +120,7 @@ int ade7758_configure_ring(struct iio_dev *indio_dev) buffer = iio_kfifo_allocate(); if (!buffer) { - ret = -ENOMEM; - return ret; + return -ENOMEM; } iio_device_attach_buffer(indio_dev, buffer); |