summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>2014-09-26 01:05:25 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-09-26 17:10:35 +0200
commit6f3aabd183984120acb59f5d57a45cfa7455be9a (patch)
treeab7ced2490a464b6d0656b5f0ef125ad7c1329b2
parentdrivers/rtc/rtc-efi.c: add missing module alias (diff)
downloadlinux-6f3aabd183984120acb59f5d57a45cfa7455be9a.tar.xz
linux-6f3aabd183984120acb59f5d57a45cfa7455be9a.zip
genalloc: fix device node resource counter
Decrement the np_pool device_node refcount, which was incremented on the preceding of_parse_phandle() call. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Olof Johansson <olof@lixom.net> Cc: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--lib/genalloc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/genalloc.c b/lib/genalloc.c
index bdb9a456bcbb..38d2db82228c 100644
--- a/lib/genalloc.c
+++ b/lib/genalloc.c
@@ -588,6 +588,7 @@ struct gen_pool *of_get_named_gen_pool(struct device_node *np,
if (!np_pool)
return NULL;
pdev = of_find_device_by_node(np_pool);
+ of_node_put(np_pool);
if (!pdev)
return NULL;
return dev_get_gen_pool(&pdev->dev);