Skip to content

Commit

Permalink
iio:chemical:sps30 Supress some switch fallthrough warnings.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jic23 committed Feb 11, 2019
1 parent 4305834 commit 59b9bb0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/iio/chemical/sps30.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 59b9bb0

Please sign in to comment.