mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
iio: mma8452: mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/iio/accel/mma8452.c: In function ‘mma8452_probe’: drivers/iio/accel/mma8452.c:1581:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (ret == data->chip_info->chip_id) ^ drivers/iio/accel/mma8452.c:1584:2: note: here default: ^~~~~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
faad0af162
commit
cb57f2eb01
1 changed files with 1 additions and 1 deletions
|
@ -1580,7 +1580,7 @@ static int mma8452_probe(struct i2c_client *client,
|
|||
case FXLS8471_DEVICE_ID:
|
||||
if (ret == data->chip_info->chip_id)
|
||||
break;
|
||||
/* else: fall through */
|
||||
/* fall through */
|
||||
default:
|
||||
ret = -ENODEV;
|
||||
goto disable_regulators;
|
||||
|
|
Loading…
Reference in a new issue