From 9d9f5a2dac916013d9b0560e176a7619f7bf958d Mon Sep 17 00:00:00 2001 From: Tina Johnson Date: Mon, 9 Mar 2015 16:11:18 +0530 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/meter/ade7758_ring.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/iio/meter/ade7758_ring.c b/drivers/staging/iio/meter/ade7758_ring.c index 3792b57..9725a04 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); -- 2.7.4