aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHartmut Knaack <knaack.h@gmx.de>2015-08-28 17:59:56 -0400
committerJonathan Cameron <jic23@kernel.org>2015-10-11 10:43:51 -0400
commit11687d4aaeb074e0a51c8008c80a14c6b8937b3d (patch)
treefceec029c16e5d75dec83b6a580796177fe3453f
parent7d2da8eaa92585769dfbafe285b94c8f743510f6 (diff)
iio:dac:m62332: drop unrequired variable
A return variable is not required in _write_raw(), and dropping it reduces complexity, as well. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/iio/dac/m62332.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/iio/dac/m62332.c b/drivers/iio/dac/m62332.c
index fe750982b502..1b65fc007bce 100644
--- a/drivers/iio/dac/m62332.c
+++ b/drivers/iio/dac/m62332.c
@@ -112,21 +112,17 @@ static int m62332_read_raw(struct iio_dev *indio_dev,
112static int m62332_write_raw(struct iio_dev *indio_dev, 112static int m62332_write_raw(struct iio_dev *indio_dev,
113 struct iio_chan_spec const *chan, int val, int val2, long mask) 113 struct iio_chan_spec const *chan, int val, int val2, long mask)
114{ 114{
115 int ret;
116
117 switch (mask) { 115 switch (mask) {
118 case IIO_CHAN_INFO_RAW: 116 case IIO_CHAN_INFO_RAW:
119 if (val < 0 || val > 255) 117 if (val < 0 || val > 255)
120 return -EINVAL; 118 return -EINVAL;
121 119
122 ret = m62332_set_value(indio_dev, val, chan->channel); 120 return m62332_set_value(indio_dev, val, chan->channel);
123 break;
124 default: 121 default:
125 ret = -EINVAL;
126 break; 122 break;
127 } 123 }
128 124
129 return ret; 125 return -EINVAL;
130} 126}
131 127
132#ifdef CONFIG_PM_SLEEP 128#ifdef CONFIG_PM_SLEEP