All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [media] xilinx-vipp: remove unnecessary of_node_put
@ 2016-03-22 10:43 Franck Jullien
  2016-03-22 12:12 ` Laurent Pinchart
  0 siblings, 1 reply; 3+ messages in thread
From: Franck Jullien @ 2016-03-22 10:43 UTC (permalink / raw)
  To: linux-media; +Cc: laurent.pinchart, hyun.kwon, Franck Jullien

of_graph_get_next_endpoint(node, ep) decrements refcount on
ep. When next==NULL we break and refcount on ep is decremented
again.

Signed-off-by: Franck Jullien <franck.jullien@odyssee-systemes.fr>
---
 drivers/media/platform/xilinx/xilinx-vipp.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
index e795a45..feb3b2f 100644
--- a/drivers/media/platform/xilinx/xilinx-vipp.c
+++ b/drivers/media/platform/xilinx/xilinx-vipp.c
@@ -351,19 +351,15 @@ static int xvip_graph_parse_one(struct xvip_composite_device *xdev,
 	struct xvip_graph_entity *entity;
 	struct device_node *remote;
 	struct device_node *ep = NULL;
-	struct device_node *next;
 	int ret = 0;
 
 	dev_dbg(xdev->dev, "parsing node %s\n", node->full_name);
 
 	while (1) {
-		next = of_graph_get_next_endpoint(node, ep);
-		if (next == NULL)
+		ep = of_graph_get_next_endpoint(node, ep);
+		if (ep == NULL)
 			break;
 
-		of_node_put(ep);
-		ep = next;
-
 		dev_dbg(xdev->dev, "handling endpoint %s\n", ep->full_name);
 
 		remote = of_graph_get_remote_port_parent(ep);
-- 
1.7.1


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

end of thread, other threads:[~2016-03-22 13:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-22 10:43 [PATCH] [media] xilinx-vipp: remove unnecessary of_node_put Franck Jullien
2016-03-22 12:12 ` Laurent Pinchart
2016-03-22 13:06   ` Franck Jullien

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.