Commit 602cf638 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Linus Walleij

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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 23087a05
...@@ -409,6 +409,7 @@ static int of_gpiochip_add_pin_range(struct gpio_chip *chip) ...@@ -409,6 +409,7 @@ static int of_gpiochip_add_pin_range(struct gpio_chip *chip)
break; break;
pctldev = of_pinctrl_get(pinspec.np); pctldev = of_pinctrl_get(pinspec.np);
of_node_put(pinspec.np);
if (!pctldev) if (!pctldev)
return -EPROBE_DEFER; return -EPROBE_DEFER;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment