Browse Source

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 <gustavo@embeddedor.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Gustavo A. R. Silva 8 years ago
parent
commit
4e57562b48
1 changed files with 2 additions and 0 deletions
  1. 2 0
      drivers/iio/imu/inv_mpu6050/inv_mpu_core.c

+ 2 - 0
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;