Skip to content
Snippets Groups Projects
Commit 34276bb0 authored by Lucas Stach's avatar Lucas Stach Committed by Rob Herring
Browse files

of: fix reference counting in of_graph_get_endpoint_by_regs


The called of_graph_get_next_endpoint() already decrements the refcount
of the prev node, so it is wrong to do it again in the calling function.

Use the for_each_endpoint_of_node() helper to interate through the
endpoint OF nodes, which already does the right thing and simplifies
the code a bit.

Fixes: 8ccd0d0c
(of: add helper for getting endpoint node of specific identifiers)
Cc: stable@vger.kernel.org
Reported-by: default avatarDavid Jander <david@protonic.nl>
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Acked-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent fc520f8b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment