From: Masahiro Yamada Date: Mon, 23 May 2016 01:52:09 +0000 (+0900) Subject: gpio: of: add missing of_node_put() to of_gpiochip_add_pin_range() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=602cf63875f73f3faaa8b3b21a6ba8d1aa32424a;p=openwrt%2Fstaging%2Fblogic.git gpio: of: add missing of_node_put() to of_gpiochip_add_pin_range() As the comment block of of_parse_phandle_with_fixed_args() says, the caller is responsible to call of_node_put() on the returned node when done. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index d22dcc38179d..d8c36c1bf850 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -409,6 +409,7 @@ static int of_gpiochip_add_pin_range(struct gpio_chip *chip) break; pctldev = of_pinctrl_get(pinspec.np); + of_node_put(pinspec.np); if (!pctldev) return -EPROBE_DEFER;