Skip to content

Commit d382c76

Browse files
author
Bartosz Golaszewski
committed
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: a060b8c ("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>
1 parent c904a0d commit d382c76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpio/gpiolib-shared.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ static void gpio_shared_remove_adev(struct auxiliary_device *adev)
415415
{
416416
lockdep_assert_held(&gpio_shared_lock);
417417

418-
auxiliary_device_uninit(adev);
419418
auxiliary_device_delete(adev);
419+
auxiliary_device_uninit(adev);
420420
}
421421

422422
int gpio_device_setup_shared(struct gpio_device *gdev)

0 commit comments

Comments
 (0)