summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorGulsah Kose <gulsah.1004@gmail.com>2014-10-01 00:09:10 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-02 10:04:18 -0700
commit042e0e463c48765692fa4813a9a26748ca1b1917 (patch)
tree869d6ffcfd7d54324a52d2e3014acca78c2fa098 /drivers/staging
parente09b142e2b43f151f795579e6dbf1a3db0e74403 (diff)
staging: iio: accel: Removed unnecessary else expression.
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/iio/accel/adis16220_core.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/staging/iio/accel/adis16220_core.c b/drivers/staging/iio/accel/adis16220_core.c
index d9a1a141099e..d478f5130a0f 100644
--- a/drivers/staging/iio/accel/adis16220_core.c
+++ b/drivers/staging/iio/accel/adis16220_core.c
@@ -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[] = {