android_kernel_xiaomi_sm7250/drivers/iio/magnetometer
Zheyu Ma 63cee8b63d iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on()
commit 3a26787dacf04257a68b16315c984eb2c340bc5e upstream.

When the driver fails to enable the regulator 'vid', we will get the
following splat:

[   79.955610] WARNING: CPU: 5 PID: 441 at drivers/regulator/core.c:2257 _regulator_put+0x3ec/0x4e0
[   79.959641] RIP: 0010:_regulator_put+0x3ec/0x4e0
[   79.967570] Call Trace:
[   79.967773]  <TASK>
[   79.967951]  regulator_put+0x1f/0x30
[   79.968254]  devres_release_group+0x319/0x3d0
[   79.968608]  i2c_device_probe+0x766/0x940

Fix this by disabling the 'vdd' regulator when failing to enable 'vid'
regulator.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Link: https://lore.kernel.org/r/20220409034849.3717231-2-zheyuma97@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-05-12 12:20:19 +02:00
..
ak8974.c iio: magnetometer: ak8974: Fix runtime PM imbalance on error 2020-07-22 09:32:02 +02:00
ak8975.c iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on() 2022-05-12 12:20:19 +02:00
bmc150_magn_i2c.c
bmc150_magn_spi.c
bmc150_magn.c
bmc150_magn.h
hid-sensor-magn-3d.c
hmc5843_core.c
hmc5843_i2c.c iio: hmc5843: fix potential NULL pointer dereferences 2019-05-31 06:46:25 -07:00
hmc5843_spi.c iio: hmc5843: fix potential NULL pointer dereferences 2019-05-31 06:46:25 -07:00
hmc5843.h
Kconfig
mag3110.c iio:magnetometer:mag3110: Fix alignment and data leak issues. 2021-01-09 13:43:48 +01:00
Makefile
mmc35240.c
st_magn_buffer.c iio:st_magn: Fix enable device after trigger 2018-12-05 19:32:13 +01:00
st_magn_core.c
st_magn_i2c.c
st_magn_spi.c
st_magn.h