linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: remove the unnecessary of_node_put for of_parse_phandle_with_args()
@ 2013-04-09  6:56 Yuantian.Tang
  2013-04-10  9:03 ` Stephen Rothwell
  0 siblings, 1 reply; 4+ messages in thread
From: Yuantian.Tang @ 2013-04-09  6:56 UTC (permalink / raw)
  To: grant.likely
  Cc: Tang Yuantian, devicetree-discuss, linuxppc-dev, linux-kernel,
	rob.herring

From: Tang Yuantian <yuantian.tang@freescale.com>

As the function itself says it is caller's responsibility to call the
of_node_put().  So, remove it on success to keep the reference count
correct.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
---
 drivers/of/base.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 321d3ef..e8b4c28 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1168,9 +1168,6 @@ static int __of_parse_phandle_with_args(const struct device_node *np,
 					out_args->args[i] = be32_to_cpup(list++);
 			}
 
-			/* Found it! return success */
-			if (node)
-				of_node_put(node);
 			return 0;
 		}
 
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-10 11:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-09  6:56 [PATCH] of: remove the unnecessary of_node_put for of_parse_phandle_with_args() Yuantian.Tang
2013-04-10  9:03 ` Stephen Rothwell
2013-04-10  9:06   ` Tang Yuantian-B29983
2013-04-10 11:09     ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).