Commit 6f3aabd1 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Linus Torvalds
Browse files

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: default avatarVladimir Zapolskiy <>
Cc: Will Deacon <>
Cc: Olof Johansson <>
Cc: Catalin Marinas <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 451ff6d4
......@@ -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);
if (!pdev)
return NULL;
return dev_get_gen_pool(&pdev->dev);
Supports Markdown
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