mirror_ubuntu-kernels/include/linux/gpio
Lukas Wunner 832b371097 gpiolib: Fix scope-based gpio_device refcounting
Commit 9e4555d1e5 ("gpiolib: add support for scope-based management to
gpio_device") sought to add scope-based gpio_device refcounting, but
erroneously forgot a negation of IS_ERR_OR_NULL().

As a result, gpio_device_put() is not called if the gpio_device pointer
is valid (meaning the ref is leaked), but only called if the pointer is
NULL or an ERR_PTR().

While at it drop a superfluous trailing semicolon.

Fixes: 9e4555d1e5 ("gpiolib: add support for scope-based management to gpio_device")
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-01-15 18:41:29 +01:00
..
aspeed.h gpio: aspeed: Add missing header(s) 2022-10-19 17:03:55 +03:00
consumer.h gpio: acpi: remove acpi_get_and_request_gpiod() 2023-10-09 14:47:15 +02:00
driver.h gpiolib: Fix scope-based gpio_device refcounting 2024-01-15 18:41:29 +01:00
gpio-reg.h gpio: reg: Add missing header(s) 2022-10-24 12:29:36 +03:00
legacy-of-mm-gpiochip.h gpiolib: split of_mm_gpio_chip out of linux/of_gpio.h 2023-03-06 12:33:01 +02:00
machine.h gpiolib: Clean up headers 2022-10-24 12:30:26 +03:00
property.h gpiolib: add support for software nodes 2022-11-15 11:21:43 +01:00
regmap.h gpio: regmap: move drvdata to config data 2021-06-07 15:39:19 +02:00