pinctrl: don't put the reference to GPIO device in pinctrl_pins_show()
Subsystems (2)
PATCH 1/1 pinctrl: don't put the reference to GPIO device in pinctrl_pins_show()
From: Bartosz Golaszewski <[email protected]>
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.
Reported-by David Arcari <[email protected]>
Signed-off-by Bartosz Golaszewski <[email protected]>
--- drivers/pinctrl/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/core.c +1 -1
@@ -1644,7 +1644,7 @@ static int pinctrl_pins_show(struct seq_file *s, void *what)const struct pinctrl_ops *ops = pctldev->desc->pctlops;unsigned int i, pin;#ifdef CONFIG_GPIOLIB - struct gpio_device *gdev __free(gpio_device_put) = NULL; +struct gpio_device *gdev =NULL ;struct pinctrl_gpio_range *range;int gpio_num;#endif
Signature · 1 line
2.40.1
Quoted 27 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
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.Reported-by David Arcari <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>--- drivers/pinctrl/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/core.c +1
-2@@ -1644,7 +1644,7 @@ static int pinctrl_pins_show(struct seq_file *s, void *what)const struct pinctrl_ops *ops = pctldev->desc->pctlops;unsigned int i, pin;#ifdef CONFIG_GPIOLIB - struct gpio_device *gdev __free(gpio_device_put) = NULL; +struct gpio_device *gdev =NULL ;struct pinctrl_gpio_range *range;int gpio_num;#endif --
Quoted 2 lines
2.40.1
Linus,
Disregard this one, it had no Fixes tag but I didn't press Ctrl-c in time.
Bart