From f033c0bcc53675562200680f4cb4a86710d9fbae Mon Sep 17 00:00:00 2001
From: Philipp Zabel
Date: Mon, 1 Dec 2014 13:32:32 +0100
Subject: of: Decrement refcount of previous endpoint in
of_graph_get_next_endpoint
Decrementing the reference count of the previous endpoint node allows to
use the of_graph_get_next_endpoint function in a for_each_... style macro.
All current users of this function that pass a non-NULL prev parameter
(that is, soc_camera and imx-drm) are changed to not decrement the passed
prev argument's refcount themselves.
Signed-off-by: Philipp Zabel
Acked-by: Mauro Carvalho Chehab
Acked-by: Mathieu Poirier
Acked-by: Laurent Pinchart
Acked-by: Tomi Valkeinen
---
drivers/video/fbdev/omap2/dss/omapdss-boot-init.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
(limited to 'drivers/video')
diff --git a/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c b/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c
index 42b87f95267c..8b6f6d5fdd68 100644
--- a/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c
+++ b/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c
@@ -164,20 +164,15 @@ static void __init omapdss_walk_device(struct device_node *node, bool root)
pn = of_graph_get_remote_port_parent(n);
- if (!pn) {
- of_node_put(n);
+ if (!pn)
continue;
- }
if (!of_device_is_available(pn) || omapdss_list_contains(pn)) {
of_node_put(pn);
- of_node_put(n);
continue;
}
omapdss_walk_device(pn, false);
-
- of_node_put(n);
}
}
--
cgit v1.2.3