diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-06-10 16:38:18 +0200 |
|---|---|---|
| committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-06-20 09:29:14 +0200 |
| commit | e1f02b40a741aac47016765c21b61e91d19aa1ec (patch) | |
| tree | 91798c64ef134f798be9a81cfdcfad22ee7eb4aa /drivers/gpio/gpiolib-sysfs.c | |
| parent | 1ae86030745013d9d54fc287c1ce875f7ddd99e6 (diff) | |
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>
Diffstat (limited to 'drivers/gpio/gpiolib-sysfs.c')
| -rw-r--r-- | drivers/gpio/gpiolib-sysfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c index 4a3aa09dad9d..cd3381a4bc93 100644 --- a/drivers/gpio/gpiolib-sysfs.c +++ b/drivers/gpio/gpiolib-sysfs.c @@ -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); |