1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-16 19:45:39 +00:00
André Draszik 11ff5e06e0 gpiolib: devres: release GPIOs in devm_gpiod_put_array()
devm_gpiod_put_array() is meant to undo the effects of
devm_gpiod_get_array() - in particular, it should release the GPIOs
contained in the array acquired with the latter. It is meant to be the
resource-managed version of gpiod_put_array(), and it should behave
similar to the non-array version devm_gpiod_put().

Since commit d1d52c6622a6 ("gpiolib: devres: Finish the conversion to
use devm_add_action()") it doesn't do that anymore, it just removes the
devres action and frees associated memory, but it doesn't actually
release the GPIOs.

Fix by switching from devm_remove_action() to devm_release_action(),
which will in addition invoke the action to release the GPIOs.

Fixes: d1d52c6622a6 ("gpiolib: devres: Finish the conversion to use devm_add_action()")
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Reported-by: Wattson CI <wattson-external@google.com>
Reported-by: Samuel Wu <wusamuel@google.com>
Link: https://lore.kernel.org/r/20250715-gpiolib-devres-put-array-fix-v1-1-970d82a8c887@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-07-17 09:22:46 +02:00
..
2024-10-17 08:53:34 +02:00
2025-05-27 15:22:01 -07:00
2025-05-27 15:22:01 -07:00
2024-10-21 09:23:34 +02:00
2025-05-27 15:22:01 -07:00
2025-05-27 15:22:01 -07:00
2025-05-27 15:22:01 -07:00
2024-11-13 16:29:27 +01:00
2025-05-27 15:22:01 -07:00
2024-11-29 11:43:29 -08:00
2025-05-27 15:22:01 -07:00
2025-03-17 08:27:10 +01:00
2024-11-04 08:46:55 +01:00
2025-02-24 09:58:42 +01:00
2025-03-17 08:27:10 +01:00
2025-05-21 12:04:30 +02:00
2025-05-27 15:22:01 -07:00