Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

of: property: Document that of_graph_get_endpoint_by_regs needs of_node_put

The node returned by of_graph_get_endpoint_by_regs has a reference taken,
and we need to put that reference back when done with the node.

However, the documentation for that node doesn't mention it, so let's make
sure it does.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Maxime Ripard and committed by
Rob Herring
deb387d4 99838f01

+1 -1
+1 -1
drivers/of/property.c
··· 659 659 * 660 660 * Return: An 'endpoint' node pointer which is identified by reg and at the same 661 661 * is the child of a port node identified by port_reg. reg and port_reg are 662 - * ignored when they are -1. 662 + * ignored when they are -1. Use of_node_put() on the pointer when done. 663 663 */ 664 664 struct device_node *of_graph_get_endpoint_by_regs( 665 665 const struct device_node *parent, int port_reg, int reg)