]> git.ipfire.org Git - thirdparty/linux.git/commit
gpio: shared: fix auxiliary device cleanup order
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Sat, 6 Dec 2025 11:53:55 +0000 (12:53 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Tue, 9 Dec 2025 06:16:45 +0000 (07:16 +0100)
commitd382c765d083ad871b4a053059351edd348a2442
tree6fe7952982d673776c1cbae3ee483cdf51c8c7db
parentc904a0d8525d5f03529ae3176e99bd32466ece7b
gpio: shared: fix auxiliary device cleanup order

Dropping the last reference to the internal struct device should be the
last thing we do so delete the device first and then uninit it which
also involves the final put_device().

Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support")
Link: https://lore.kernel.org/r/20251206-gpio-shared-teardown-fixes-v1-3-35ac458cfce1@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpiolib-shared.c