From: Sachin Kamat Date: Fri, 7 Mar 2014 07:38:00 +0000 (+0000) Subject: iio: ad5504: Remove redundant variable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0d3a9b2daddc1ebb6db66d5f913bcd93f449f8e5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iio: ad5504: Remove redundant variable By re-arranging the code, 'ret' can be removed from this function. Signed-off-by: Sachin Kamat Acked-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c index c917dd24090a..581ec141de3d 100644 --- a/drivers/iio/dac/ad5504.c +++ b/drivers/iio/dac/ad5504.c @@ -125,7 +125,6 @@ static int ad5504_write_raw(struct iio_dev *indio_dev, long mask) { struct ad5504_state *st = iio_priv(indio_dev); - int ret; switch (mask) { case IIO_CHAN_INFO_RAW: @@ -134,10 +133,8 @@ static int ad5504_write_raw(struct iio_dev *indio_dev, return ad5504_spi_write(st, chan->address, val); default: - ret = -EINVAL; + return -EINVAL; } - - return -EINVAL; } static const char * const ad5504_powerdown_modes[] = {