kernel_optimize_test/drivers/iio/magnetometer
Zheyu Ma ca2b54b6ad 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-09 09:04:58 +02:00
..
ak8974.c
ak8975.c iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on() 2022-05-09 09:04:58 +02:00
bmc150_magn_i2c.c
bmc150_magn_spi.c
bmc150_magn.c iio: Fix error handling for PM 2022-03-02 11:42:53 +01:00
bmc150_magn.h
hid-sensor-magn-3d.c
hmc5843_core.c iio: magn: hmc5843: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-14 16:56:36 +02:00
hmc5843_i2c.c
hmc5843_spi.c
hmc5843.h iio: magn: hmc5843: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-14 16:56:36 +02:00
Kconfig iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER 2021-05-19 10:13:13 +02:00
mag3110.c
Makefile
mmc35240.c
rm3100-core.c iio: magn: rm3100: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() 2021-07-14 16:56:45 +02:00
rm3100-i2c.c
rm3100-spi.c
rm3100.h
st_magn_buffer.c
st_magn_core.c iio: st_sensors: Call st_sensors_power_enable() from bus drivers 2021-11-18 14:04:13 +01:00
st_magn_i2c.c iio: st_sensors: disable regulators after device unregistration 2021-11-18 14:04:13 +01:00
st_magn_spi.c iio: st_sensors: disable regulators after device unregistration 2021-11-18 14:04:13 +01:00
st_magn.h