WSL2-Linux-Kernel/drivers/iio/imu
Miaoqian Lin 72b0fba2dd iio: Fix error handling for PM
commit 632fe0bb8c upstream.

The pm_runtime_enable will increase power disable depth.
If the probe fails, we should use pm_runtime_disable() to balance
pm_runtime_enable(). In the PM Runtime docs:
    Drivers in ->remove() callback should undo the runtime PM changes done
    in ->probe(). Usually this means calling pm_runtime_disable(),
    pm_runtime_dont_use_autosuspend() etc.
We should do this in error handling.

Fix this problem for the following drivers: bmc150, bmg160, kmx61,
kxcj-1013, mma9551, mma9553.

Fixes: 7d0ead5c3f ("iio: Reconcile operation order between iio_register/unregister and pm functions")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220106112309.16879-1-linmq006@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-02 11:48:04 +01:00
..
bmi160 iio: Drop Duplicated "mount-matrix" parameter 2021-06-03 18:24:13 +01:00
inv_icm42600 iio: Drop Duplicated "mount-matrix" parameter 2021-06-03 18:24:13 +01:00
inv_mpu6050 Add startup time for each chip using inv_mpu6050 driver 2021-07-19 09:51:59 +01:00
st_lsm6dsx iio: imu: st_lsm6dsx: wait for settling time in st_lsm6dsx_read_oneshot 2022-03-02 11:48:04 +01:00
st_lsm9ds0 iio: st-sensors: Remove some unused includes and add some that should be there 2021-07-24 15:59:00 +01:00
Kconfig iio: st_sensors: Add lsm9ds0 IMU support 2021-05-17 13:54:22 +01:00
Makefile iio: st_sensors: Add lsm9ds0 IMU support 2021-05-17 13:54:22 +01:00
adis.c iio: adis: do not disabe IRQs in 'adis_init()' 2021-11-18 19:16:54 +01:00
adis16400.c iio: imu: remove unused private data assigned with spi_set_drvdata() 2021-06-13 17:00:17 +01:00
adis16460.c iio: imu: remove unused private data assigned with spi_set_drvdata() 2021-06-13 17:00:17 +01:00
adis16475.c iio: adis16475: fix deadlock on frequency set 2021-09-25 16:01:06 +01:00
adis16480.c iio:imu:adis16480: fix buffering for devices with no burst mode 2022-03-02 11:48:03 +01:00
adis_buffer.c iio: adis: add burst_max_speed_hz variable 2021-05-17 13:49:09 +01:00
adis_trigger.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01:00
fxos8700.h iio: imu: Add support for the FXOS8700 IMU 2019-10-22 10:24:50 +01:00
fxos8700_core.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
fxos8700_i2c.c iio: imu: fxos8700: Drop unneeded explicit castings 2021-03-25 19:13:50 +00:00
fxos8700_spi.c iio: imu: fxos8700: Drop unneeded explicit castings 2021-03-25 19:13:50 +00:00
kmx61.c iio: Fix error handling for PM 2022-03-02 11:48:04 +01:00