diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-05-22 21:52:09 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-06-07 03:35:16 -0400 |
commit | 602cf63875f73f3faaa8b3b21a6ba8d1aa32424a (patch) | |
tree | 688bc49fbaa28abfa1fcf895da6e790e064c3c71 | |
parent | 23087a05006057bbaa2c1f42163e45586dd77094 (diff) |
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 <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/gpio/gpiolib-of.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) | |||
409 | break; | 409 | break; |
410 | 410 | ||
411 | pctldev = of_pinctrl_get(pinspec.np); | 411 | pctldev = of_pinctrl_get(pinspec.np); |
412 | of_node_put(pinspec.np); | ||
412 | if (!pctldev) | 413 | if (!pctldev) |
413 | return -EPROBE_DEFER; | 414 | return -EPROBE_DEFER; |
414 | 415 | ||