diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2016-07-09 22:17:36 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-07-22 09:30:42 -0400 |
commit | bfab7c8ff89a9dddbe9a08299c24f5e2bf3953f9 (patch) | |
tree | e53a7f10511269837a0fdfd7dcaf03863b2e3019 | |
parent | fcce9f14f07db15650d84650293e2207f7dabbfa (diff) |
gpio: dwapb: add missing fwnode_handle_put() in dwapb_gpio_get_pdata()
fwnode_handle_put() should be used when terminating
device_for_each_child_node() iteration with break or
return to prevent stale device node references from
being left behind.
Generated by Coccinelle.
Fixes: 4ba8cfa79f44 ("gpio: dwapb: convert device node to fwnode")
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/gpio/gpio-dwapb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c index 34779bb375de..6193f62c0df4 100644 --- a/drivers/gpio/gpio-dwapb.c +++ b/drivers/gpio/gpio-dwapb.c | |||
@@ -486,6 +486,7 @@ dwapb_gpio_get_pdata(struct device *dev) | |||
486 | pp->idx >= DWAPB_MAX_PORTS) { | 486 | pp->idx >= DWAPB_MAX_PORTS) { |
487 | dev_err(dev, | 487 | dev_err(dev, |
488 | "missing/invalid port index for port%d\n", i); | 488 | "missing/invalid port index for port%d\n", i); |
489 | fwnode_handle_put(fwnode); | ||
489 | return ERR_PTR(-EINVAL); | 490 | return ERR_PTR(-EINVAL); |
490 | } | 491 | } |
491 | 492 | ||