]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpio: sysfs: call mutex_destroy() in gpiod_unexport()
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 10 Jun 2025 14:38:18 +0000 (16:38 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 20 Jun 2025 07:29:14 +0000 (09:29 +0200)
commite1f02b40a741aac47016765c21b61e91d19aa1ec
tree91798c64ef134f798be9a81cfdcfad22ee7eb4aa
parent1ae86030745013d9d54fc287c1ce875f7ddd99e6
gpio: sysfs: call mutex_destroy() in gpiod_unexport()

While not critical, it's useful to have the corresponding call to
mutex_destroy() whenever we use mutex_init(). Add the call right before
kfreeing the GPIO data.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250610-gpio-sysfs-chip-export-v1-3-a8c7aa4478b1@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpiolib-sysfs.c