linux-stable/drivers/iio/magnetometer
Zheyu Ma 2c97a2b5ef iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on()
commit 3a26787dac 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-09 09:03:21 +02:00
..
ak8974.c
ak8975.c iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on() 2022-05-09 09:03:21 +02:00
bmc150_magn.c iio: Fix error handling for PM 2022-03-02 11:41:12 +01:00
bmc150_magn.h
bmc150_magn_i2c.c
bmc150_magn_spi.c
hid-sensor-magn-3d.c
hmc5843.h iio: magn: hmc5843: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-14 16:53:39 +02:00
hmc5843_core.c iio: magn: hmc5843: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-14 16:53:39 +02:00
hmc5843_i2c.c
hmc5843_spi.c
Kconfig
mag3110.c iio:magnetometer:mag3110: Fix alignment and data leak issues. 2020-12-30 11:51:44 +01:00
Makefile
mmc35240.c
rm3100-core.c iio: magn: rm3100: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() 2021-07-14 16:53:43 +02:00
rm3100-i2c.c
rm3100-spi.c
rm3100.h
st_magn.h
st_magn_buffer.c
st_magn_core.c
st_magn_i2c.c
st_magn_spi.c