diff options
author | 2017-08-22 02:19:12 +0200 | |
---|---|---|
committer | 2017-10-12 12:26:14 -0500 | |
commit | 3314c6bdd26880e0dfbcb0cb85a1b36d185ce47c (patch) | |
tree | 67396bb93b7c7643dab5ae0959d8797997fd9a6f /drivers/of | |
parent | drivers: of: increase MAX_RESERVED_REGIONS to 32 (diff) | |
download | linux-3314c6bdd26880e0dfbcb0cb85a1b36d185ce47c.tar.gz linux-3314c6bdd26880e0dfbcb0cb85a1b36d185ce47c.tar.bz2 linux-3314c6bdd26880e0dfbcb0cb85a1b36d185ce47c.zip |
device property: preserve usecount for node passed to of_fwnode_graph_get_port_parent()
Using CONFIG_OF_DYNAMIC=y uncovered an imbalance in the usecount of the
node being passed to of_fwnode_graph_get_port_parent(). Preserve the
usecount by using of_get_parent() instead of of_get_next_parent() which
don't decrement the usecount of the node passed to it.
Fixes: 3b27d00e7b6d7c88 ("device property: Move fwnode graph ops to firmware specific locations")
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/property.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/property.c b/drivers/of/property.c index fbb72116e9d4..264c355ba1ff 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -954,7 +954,7 @@ of_fwnode_graph_get_port_parent(struct fwnode_handle *fwnode) struct device_node *np; /* Get the parent of the port */ - np = of_get_next_parent(to_of_node(fwnode)); + np = of_get_parent(to_of_node(fwnode)); if (!np) return NULL; |