]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iio:dac:m62332: drop unrequired variable
authorHartmut Knaack <knaack.h@gmx.de>
Fri, 28 Aug 2015 21:59:56 +0000 (23:59 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 11 Oct 2015 14:43:51 +0000 (15:43 +0100)
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>
drivers/iio/dac/m62332.c

index fe750982b502baa76917c9820d4f02fafacf68c0..1b65fc007bce83a93f7056a6c7a0a908e6ce10a8 100644 (file)
@@ -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