staging: iio: accel: Removed unnecessary else expression.
authorGulsah Kose <gulsah.1004@gmail.com>
Tue, 30 Sep 2014 21:09:10 +0000 (00:09 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Oct 2014 17:04:18 +0000 (10:04 -0700)
This patch fixes "else is not generally useful after a break or return"
checkpatch.pl warning in adis16220_core.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/accel/adis16220_core.c

index d9a1a141099ef8169d37d24ce7464ae8e16aba08..d478f5130a0fb461ff039a72cb48a75f79e7beff 100644 (file)
@@ -323,15 +323,14 @@ static int adis16220_read_raw(struct iio_dev *indio_dev,
                sval = (s16)(sval << (16 - bits)) >> (16 - bits);
                *val = sval;
                return IIO_VAL_INT;
-       } else {
-               ret = adis_read_reg_16(&st->adis, addr->addr, &uval);
-               if (ret)
-                       return ret;
-               bits = addr->bits;
-               uval &= (1 << bits) - 1;
-               *val = uval;
-               return IIO_VAL_INT;
        }
+       ret = adis_read_reg_16(&st->adis, addr->addr, &uval);
+       if (ret)
+               return ret;
+       bits = addr->bits;
+       uval &= (1 << bits) - 1;
+       *val = uval;
+       return IIO_VAL_INT;
 }
 
 static const struct iio_chan_spec adis16220_channels[] = {