summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2019-02-09 20:32:58 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-02-11 21:07:51 +0100
commit59b9bb0abca9efe47207301dbaf0d1beee2bd0f7 (patch)
tree4c6522076d8bb2c3c895dcb7875af7aab151f511 /drivers/iio
parentiio:adc:lpc32xx use SPDX-License-Identifier (diff)
downloadlinux-59b9bb0abca9efe47207301dbaf0d1beee2bd0f7.tar.xz
linux-59b9bb0abca9efe47207301dbaf0d1beee2bd0f7.zip
iio:chemical:sps30 Supress some switch fallthrough warnings.
Fixes warnings reported on linux-next but marking one path and adding an explicit return in the other. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Andreas Brauchli <a.brauchli@elementarea.net> Acked-by: Tomasz Duszynski <tduszyns@gmail.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/chemical/sps30.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iio/chemical/sps30.c b/drivers/iio/chemical/sps30.c
index 375df5060ed5..edbb956e81e8 100644
--- a/drivers/iio/chemical/sps30.c
+++ b/drivers/iio/chemical/sps30.c
@@ -118,6 +118,7 @@ static int sps30_do_cmd(struct sps30_state *state, u16 cmd, u8 *data, int size)
case SPS30_READ_AUTO_CLEANING_PERIOD:
buf[0] = SPS30_AUTO_CLEANING_PERIOD >> 8;
buf[1] = (u8)SPS30_AUTO_CLEANING_PERIOD;
+ /* fall through */
case SPS30_READ_DATA_READY_FLAG:
case SPS30_READ_DATA:
case SPS30_READ_SERIAL:
@@ -295,6 +296,8 @@ static int sps30_read_raw(struct iio_dev *indio_dev,
*val2 = 10000;
return IIO_VAL_INT_PLUS_MICRO;
+ default:
+ return -EINVAL;
}
default:
return -EINVAL;