From: Tina Johnson Date: Mon, 9 Mar 2015 10:41:18 +0000 (+0530) Subject: drivers: staging: iio: meter: Removed unnecessary variable X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9d9f5a2dac916013d9b0560e176a7619f7bf958d;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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);