Commit 6f3aabd183984120acb59f5d57a45cfa7455be9a

Authored by Vladimir Zapolskiy
Committed by Linus Torvalds
1 parent 451ff6d409

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>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

... ... @@ -588,6 +588,7 @@
588 588 if (!np_pool)
589 589 return NULL;
590 590 pdev = of_find_device_by_node(np_pool);
  591 + of_node_put(np_pool);
591 592 if (!pdev)
592 593 return NULL;
593 594 return dev_get_gen_pool(&pdev->dev);