gpio: of: add missing of_node_put() to of_gpiochip_add_pin_range()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 23 May 2016 01:52:09 +0000 (10:52 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 7 Jun 2016 07:35:16 +0000 (09:35 +0200)
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 <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-of.c

index d22dcc38179dba153d3874e39847665a2811f8b9..d8c36c1bf85058af8328a7fedecda14a06e2381e 100644 (file)
@@ -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;