mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 23:45:31 +08:00
[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>
This commit is contained in:
parent
91f9241fd3
commit
5045b49519
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user