WSL2-Linux-Kernel/drivers/iio/accel
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
..
Kconfig
Makefile
adis16201.c
adis16209.c
adxl345.h
adxl345_core.c
adxl345_i2c.c
adxl345_spi.c
adxl372.c
adxl372.h
adxl372_i2c.c
adxl372_spi.c
bma180.c
bma220_spi.c
bma400.h
bma400_core.c
bma400_i2c.c
bma400_spi.c
bmc150-accel-core.c iio: Fix error handling for PM 2022-03-02 11:48:04 +01:00
bmc150-accel-i2c.c
bmc150-accel-spi.c
bmc150-accel.h
bmi088-accel-core.c
bmi088-accel-spi.c
bmi088-accel.h
cros_ec_accel_legacy.c
da280.c
da311.c
dmard06.c
dmard09.c
dmard10.c
fxls8962af-core.c iio: accel: fxls8962af: add padding to regmap for SPI 2022-03-02 11:48:03 +01:00
fxls8962af-i2c.c iio: accel: fxls8962af: add padding to regmap for SPI 2022-03-02 11:48:03 +01:00
fxls8962af-spi.c iio: accel: fxls8962af: add padding to regmap for SPI 2022-03-02 11:48:03 +01:00
fxls8962af.h iio: accel: fxls8962af: add padding to regmap for SPI 2022-03-02 11:48:03 +01:00
hid-sensor-accel-3d.c
kxcjk-1013.c iio: Fix error handling for PM 2022-03-02 11:48:04 +01:00
kxsd9-i2c.c
kxsd9-spi.c
kxsd9.c iio: kxsd9: Don't return error code in trigger handler 2021-12-14 10:57:21 +01:00
kxsd9.h
mc3230.c
mma7455.h
mma7455_core.c
mma7455_i2c.c
mma7455_spi.c
mma7660.c
mma8452.c iio: mma8452: Fix trigger reference couting 2021-12-14 10:57:20 +01:00
mma9551.c iio: Fix error handling for PM 2022-03-02 11:48:04 +01:00
mma9551_core.c
mma9551_core.h
mma9553.c iio: Fix error handling for PM 2022-03-02 11:48:04 +01:00
mxc4005.c
mxc6255.c
sca3000.c
sca3300.c
ssp_accel_sensor.c
st_accel.h
st_accel_buffer.c
st_accel_core.c
st_accel_i2c.c
st_accel_spi.c
stk8ba50.c
stk8312.c