mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
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>
This commit is contained in:
parent
1ae8603074
commit
e1f02b40a7
|
|
@ -713,6 +713,7 @@ void gpiod_unexport(struct gpio_desc *desc)
|
|||
}
|
||||
|
||||
put_device(dev);
|
||||
mutex_destroy(&data->mutex);
|
||||
kfree(data);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gpiod_unexport);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user