aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@samsung.com>2014-03-07 02:38:00 -0500
committerJonathan Cameron <jic23@kernel.org>2014-07-03 16:56:35 -0400
commit15255c6b4de66b8d282d0b62398d90ff7b24f4a5 (patch)
tree82cf01099a757ec788d167218df60cdb61bf16ce /drivers/iio/dac
parenta9fbbbd7d2668232babc60ef77539dd82a33a89c (diff)
iio: ad5624r_spi: 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/dac')
-rw-r--r--drivers/iio/dac/ad5624r_spi.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/iio/dac/ad5624r_spi.c b/drivers/iio/dac/ad5624r_spi.c
index e8199cce2aea..61bb9d4239ea 100644
--- a/drivers/iio/dac/ad5624r_spi.c
+++ b/drivers/iio/dac/ad5624r_spi.c
@@ -67,7 +67,6 @@ static int ad5624r_write_raw(struct iio_dev *indio_dev,
67 long mask) 67 long mask)
68{ 68{
69 struct ad5624r_state *st = iio_priv(indio_dev); 69 struct ad5624r_state *st = iio_priv(indio_dev);
70 int ret;
71 70
72 switch (mask) { 71 switch (mask) {
73 case IIO_CHAN_INFO_RAW: 72 case IIO_CHAN_INFO_RAW:
@@ -79,10 +78,8 @@ static int ad5624r_write_raw(struct iio_dev *indio_dev,
79 chan->address, val, 78 chan->address, val,
80 chan->scan_type.shift); 79 chan->scan_type.shift);
81 default: 80 default:
82 ret = -EINVAL; 81 return -EINVAL;
83 } 82 }
84
85 return -EINVAL;
86} 83}
87 84
88static const char * const ad5624r_powerdown_modes[] = { 85static const char * const ad5624r_powerdown_modes[] = {