aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-05-17 06:31:04 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-12-18 03:26:20 -0500
commit027eb8806564216be18b0d3f50f998600398b65f (patch)
tree77775f2f7604b2932afa8b7ec102e9e7ec63a1b6
parent189c028f4771d69559762cb8035cc6927b3647fe (diff)
[media] v4l: of: Drop endpoint node reference in v4l2_of_get_remote_port()
The v4l2_of_get_remote_port() function acquires a reference to an endpoint node through a phandle and then returns the node's parent, without dropping the reference to the endpoint node. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/v4l2-core/v4l2-of.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/v4l2-of.c b/drivers/media/v4l2-core/v4l2-of.c
index 66a0e2337184..42e3e8a5e361 100644
--- a/drivers/media/v4l2-core/v4l2-of.c
+++ b/drivers/media/v4l2-core/v4l2-of.c
@@ -266,6 +266,6 @@ struct device_node *v4l2_of_get_remote_port(const struct device_node *node)
266 np = of_parse_phandle(node, "remote-endpoint", 0); 266 np = of_parse_phandle(node, "remote-endpoint", 0);
267 if (!np) 267 if (!np)
268 return NULL; 268 return NULL;
269 return of_get_parent(np); 269 return of_get_next_parent(np);
270} 270}
271EXPORT_SYMBOL(v4l2_of_get_remote_port); 271EXPORT_SYMBOL(v4l2_of_get_remote_port);