summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-07-03 02:05:51 (GMT)
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-08-18 11:48:33 (GMT)
commit5045b495196a624c17a1ef271cbdaa6d3e2d1097 (patch)
tree0c3cbe83c0ac41dd719008f5683adc21a8ab85f5
parent91f9241fd3487cd959abcf8c210af620ebfeb2cd (diff)
downloadlinux-5045b495196a624c17a1ef271cbdaa6d3e2d1097.tar.xz
[media] v4l: of: Drop acquired reference to node when getting next endpoint
The of_get_child_by_name() function takes a reference to the node it returns. Make sure to drop it when looking for the ports node in v4l2_of_get_next_endpoint(). 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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-of.c b/drivers/media/v4l2-core/v4l2-of.c
index f64d953..ed305d8 100644
--- a/drivers/media/v4l2-core/v4l2-of.c
+++ b/drivers/media/v4l2-core/v4l2-of.c
@@ -186,6 +186,7 @@ struct device_node *v4l2_of_get_next_endpoint(const struct device_node *parent,
if (!endpoint)
pr_err("%s(): no endpoint nodes specified for %s\n",
__func__, parent->full_name);
+ of_node_put(node);
} else {
port = of_get_parent(prev);
if (!port)