linux-stable/drivers/iio
Zheyu Ma a4ed806c53 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-12 12:17:05 +02:00
..
accel iio: accel: kxcjk-1013: Fix possible memory leak in probe and remove 2021-12-14 10:16:57 +01:00
adc iio: adc: Add check for devm_request_threaded_irq 2022-04-20 09:08:19 +02:00
amplifiers
buffer
chemical iio:chemical:ccs811: Fix timestamp alignment and prevent data leak. 2020-09-23 10:46:29 +02:00
common iio: ssp_sensors: fix error code in ssp_print_mcu_debug() 2021-10-20 10:42:04 +02:00
counter iio: 104-quad-8: Fix off-by-one error in register selection 2018-10-03 17:00:53 -07:00
dac iio: dac: ad5446: Fix read_raw not returning set value 2022-05-12 12:17:05 +02:00
dummy
frequency
gyro iio: itg3200: Call iio_trigger_notify_done() on error 2021-12-14 10:16:57 +01:00
health iio:health:afe4404 Fix timestamp alignment and prevent data leak. 2020-07-22 09:22:24 +02:00
humidity iio: humidity: hdc100x: Add margin to the conversion time 2021-08-26 08:37:00 -04:00
imu iio: adis_buffer: do not return ints in irq handlers 2021-07-20 16:17:38 +02:00
light iio: ltr501: Don't return error code in trigger handler 2021-12-14 10:16:56 +01:00
magnetometer iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on() 2022-05-12 12:17:05 +02:00
multiplexer
orientation iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-12-17 09:28:49 +01:00
potentiometer
potentiostat iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() 2021-07-20 16:17:39 +02:00
pressure iio:pressure:mpl3115: Force alignment of buffer 2020-12-29 13:47:10 +01:00
proximity iio: prox: as3935: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-20 16:17:39 +02:00
temperature iio: hid-sensor-temperature: Fix issues of timestamp channel 2021-03-24 11:05:04 +01:00
trigger iio: trigger: stm32-timer: fix MODULE_ALIAS 2021-12-14 10:16:56 +01:00
Kconfig
Makefile
iio_core.h
iio_core_trigger.h
industrialio-buffer.c iio: buffer: Fix demux update 2020-12-29 13:47:10 +01:00
industrialio-configfs.c
industrialio-core.c iio: core: fix a possible circular locking dependency 2019-04-27 09:35:36 +02:00
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c iio: trigger: Fix reference counting 2021-12-14 10:16:56 +01:00
industrialio-triggered-event.c
inkern.c iio: inkern: make a best effort on offset calculation 2022-04-20 09:08:09 +02:00