Skip to content

Commit f6443e0

Browse files
Bartosz Golaszewskilinusw
authored andcommitted
pinctrl: don't put the reference to GPIO device in pinctrl_pins_show()
The call to gpiod_to_gpio_device() does not increase the reference count of the GPIO device struct so it must not be decreased. Remove the buggy __free() decorator. Fixes: 524fc10 ("pinctrl: stop using gpiod_to_chip()") Reported-by: David Arcari <darcari@redhat.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20240223123214.288181-1-brgl@bgdev.pl Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent cb4443f commit f6443e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pinctrl/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,7 @@ static int pinctrl_pins_show(struct seq_file *s, void *what)
16441644
const struct pinctrl_ops *ops = pctldev->desc->pctlops;
16451645
unsigned int i, pin;
16461646
#ifdef CONFIG_GPIOLIB
1647-
struct gpio_device *gdev __free(gpio_device_put) = NULL;
1647+
struct gpio_device *gdev = NULL;
16481648
struct pinctrl_gpio_range *range;
16491649
int gpio_num;
16501650
#endif

0 commit comments

Comments
 (0)