From: Vladimir Zapolskiy Date: Thu, 25 Sep 2014 23:05:25 +0000 (-0700) Subject: genalloc: fix device node resource counter X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6f3aabd183984120acb59f5d57a45cfa7455be9a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Will Deacon Cc: Olof Johansson Cc: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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);