Files
linux/drivers/iio/adc
Matti Vaittinen 22b4277641 iio: ad7292: Prevent regulator double disable
The ad7292 tries to add an devm_action for disabling a regulator at
device detach using devm_add_action_or_reset(). The
devm_add_action_or_reset() does call the release function should adding
action fail. The driver inspects the value returned by
devm_add_action_or_reset() and manually calls regulator_disable() if
adding the action has failed. This leads to double disable and messes
the enable count for regulator.

Do not manually call disable if devm_add_action_or_reset() fails.

Fixes: 506d2e317a ("iio: adc: Add driver support for AD7292")
Signed-off-by: Matti Vaittinen <[email protected]>
Tested-by: Marcelo Schmitt <[email protected]>
Link: https://lore.kernel.org/r/Yv9O+9sxU7gAv3vM@fedora
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
2022-08-21 18:24:16 +01:00
..
2022-07-16 18:50:24 +01:00
…
…
…
2022-01-23 18:03:36 +00:00
…
2022-07-18 18:29:29 +01:00