Tong Zhang
9e4dedb8ec
iio:imu:bmi160: disable regulator in error path
...
[ Upstream commit d926054d5565d3cfa2c7c3f7a48e79bcc10453ed ]
Regulator should be disabled in error path as mentioned in _regulator_put().
Also disable accel if gyro cannot be enabled.
[ 16.233604] WARNING: CPU: 0 PID: 2177 at drivers/regulator/core.c:2257 _regulator_put
[ 16.240453] Call Trace:
[ 16.240572] <TASK>
[ 16.240676] regulator_put+0x26/0x40
[ 16.240853] regulator_bulk_free+0x26/0x50
[ 16.241050] release_nodes+0x3f/0x70
[ 16.241225] devres_release_group+0x147/0x1c0
[ 16.241441] ? bmi160_core_probe+0x175/0x3a0 [bmi160_core]
Fixes: 5dea3fb066f0 ("iio: imu: bmi160: added regulator support")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Link: https://lore.kernel.org/r/20220327154005.806049-1-ztong0001@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-09 09:14:31 +02:00
..
2022-04-08 14:23:45 +02:00
2022-04-08 14:23:46 +02:00
2022-04-08 14:22:50 +02:00
2021-05-17 13:49:13 +01:00
2021-04-07 08:36:39 +01:00
2021-08-08 15:19:18 +01:00
2021-09-18 19:10:55 +01:00
2022-05-09 09:14:28 +02:00
2021-06-13 17:00:17 +01:00
2021-06-13 17:00:17 +01:00
2022-03-02 11:48:04 +01:00
2021-05-17 13:49:13 +01:00
2021-07-24 18:13:02 +01:00
2022-05-09 09:14:31 +02:00
2021-12-14 10:57:21 +01:00
2022-05-09 09:14:28 +02:00
2021-07-13 18:21:53 +01:00
2021-06-16 14:53:13 +01:00
2021-08-15 15:38:16 +01:00
2021-05-17 13:54:30 +01:00
2021-11-18 19:16:50 +01:00
2021-07-31 15:15:28 +01:00
2020-09-21 18:41:31 +01:00
2021-08-15 16:58:37 +01:00
2021-10-06 17:53:36 -06:00
2021-12-14 10:57:20 +01:00
2021-03-11 20:47:02 +00:00
2021-03-25 19:13:51 +00:00
2022-02-16 12:56:37 +01:00
2021-11-18 19:16:02 +01:00
2021-04-07 08:36:36 +01:00
2022-01-27 11:02:57 +01:00
2021-05-17 13:49:13 +01:00
2022-04-08 14:22:50 +02:00
2021-04-07 08:36:37 +01:00
2021-04-07 08:36:37 +01:00