From 4e57562b4846e42cd1c2e556f0ece18c1154e116 Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Tue, 22 Aug 2017 14:13:25 -0500 Subject: [PATCH] iio: imu: inv_mpu6050: fix missing break in switch Add missing break statement to prevent the code for case IIO_CHAN_INFO_CALIBBIAS falling through to the default case. Also, add a break to the default case for the switch within case IIO_CHAN_INFO_CALIBBIAS. Addresses-Coverity-ID: 1357377 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jonathan Cameron --- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index db578e0faaab..097ce1fd6f69 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c @@ -542,7 +542,9 @@ static int inv_mpu6050_write_raw(struct iio_dev *indio_dev, break; default: result = -EINVAL; + break; } + break; default: result = -EINVAL; break;