iio: imu: inv_mpu6050: fix error path not turning chip back off
authorJean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Mon, 23 Apr 2018 10:33:30 +0000 (12:33 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 28 Apr 2018 15:48:10 +0000 (16:48 +0100)
commiteaa54d96a435eafe801e1374eccde254b72221f5
tree2a929562401f44580e55899cf4589704373909a1
parent4cfcb2bfdd07b130f05a3fb39edd6bfa2a59bf7a
iio: imu: inv_mpu6050: fix error path not turning chip back off

Some functions are turning the chip on and not back off in error
path. With set_power function using a reference counter that
would keep the chip on forever.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c