summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@samsung.com>2014-03-07 07:38:00 +0000
committerJonathan Cameron <jic23@kernel.org>2014-07-03 21:58:26 +0100
commit0d3a9b2daddc1ebb6db66d5f913bcd93f449f8e5 (patch)
tree647895000934fac73be919249087ce8a31900f27 /drivers/iio
parent15255c6b4de66b8d282d0b62398d90ff7b24f4a5 (diff)
downloadop-kernel-dev-0d3a9b2daddc1ebb6db66d5f913bcd93f449f8e5.zip
op-kernel-dev-0d3a9b2daddc1ebb6db66d5f913bcd93f449f8e5.tar.gz
iio: ad5504: Remove redundant variable
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>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/dac/ad5504.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c
index c917dd2..581ec14 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[] = {
OpenPOWER on IntegriCloud