iio: ad5624r_spi: Remove redundant variable
authorSachin Kamat <sachin.kamat@samsung.com>
Fri, 7 Mar 2014 07:38:00 +0000 (07:38 +0000)
committerJonathan Cameron <jic23@kernel.org>
Thu, 3 Jul 2014 20:56:35 +0000 (21:56 +0100)
By re-arranging the code, 'ret' can be removed from this
function.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/dac/ad5624r_spi.c

index e8199cce2aeaed585dd80e600a654ed3f52d03c3..61bb9d4239eafdacf6f6d5f8cdb7238537d2c376 100644 (file)
@@ -67,7 +67,6 @@ static int ad5624r_write_raw(struct iio_dev *indio_dev,
                               long mask)
 {
        struct ad5624r_state *st = iio_priv(indio_dev);
-       int ret;
 
        switch (mask) {
        case IIO_CHAN_INFO_RAW:
@@ -79,10 +78,8 @@ static int ad5624r_write_raw(struct iio_dev *indio_dev,
                                chan->address, val,
                                chan->scan_type.shift);
        default:
-               ret = -EINVAL;
+               return -EINVAL;
        }
-
-       return -EINVAL;
 }
 
 static const char * const ad5624r_powerdown_modes[] = {