iio: imu: inv_mpu6050: fix missing break in switch
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Tue, 22 Aug 2017 19:13:25 +0000 (14:13 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 3 Sep 2017 17:10:30 +0000 (18:10 +0100)
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 <gustavo@embeddedor.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c

index db578e0..097ce1f 100644 (file)
@@ -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;