mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
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>
This commit is contained in:
parent
7d2da8eaa9
commit
11687d4aae
1 changed files with 2 additions and 6 deletions
|
@ -112,21 +112,17 @@ static int m62332_read_raw(struct iio_dev *indio_dev,
|
|||
static int m62332_write_raw(struct iio_dev *indio_dev,
|
||||
struct iio_chan_spec const *chan, int val, int val2, long mask)
|
||||
{
|
||||
int ret;
|
||||
|
||||
switch (mask) {
|
||||
case IIO_CHAN_INFO_RAW:
|
||||
if (val < 0 || val > 255)
|
||||
return -EINVAL;
|
||||
|
||||
ret = m62332_set_value(indio_dev, val, chan->channel);
|
||||
break;
|
||||
return m62332_set_value(indio_dev, val, chan->channel);
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
|
|
Loading…
Reference in a new issue